<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Running VB code in Matlab	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/running-vb-code-in-matlab/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=running-vb-code-in-matlab</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Tue, 06 Mar 2018 11:20:15 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-419761</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 06 Mar 2018 11:20:15 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-419761</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-419760&quot;&gt;Peter&lt;/a&gt;.

@Peter - &lt;code&gt;hParent&lt;/code&gt; is supposed to be the handle to the container (typically a uipanel) that contains your control.

As to why MSCOMCTL is not available in your system, that&#039;s probably because you&#039;re using a new Windows version that does not have this control. After all, the post was originally written back in 2011, when Windows XP was king. You might find an alternative ActiveX control on your Windows, but my opinion is that ActiveX should be avoided in general - it&#039;s an old and problematic technology. You&#039;d be much better off using Java controls instead.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-419760">Peter</a>.</p>
<p>@Peter &#8211; <code>hParent</code> is supposed to be the handle to the container (typically a uipanel) that contains your control.</p>
<p>As to why MSCOMCTL is not available in your system, that&#8217;s probably because you&#8217;re using a new Windows version that does not have this control. After all, the post was originally written back in 2011, when Windows XP was king. You might find an alternative ActiveX control on your Windows, but my opinion is that ActiveX should be avoided in general &#8211; it&#8217;s an old and problematic technology. You&#8217;d be much better off using Java controls instead.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Peter		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-419760</link>

		<dc:creator><![CDATA[Peter]]></dc:creator>
		<pubDate>Tue, 06 Mar 2018 11:10:34 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-419760</guid>

					<description><![CDATA[Hi Yair, big fan of your blog. Thank you for increasing the worlds productivity by a not insignificant margin.

On-topic then, I&#039;m trying to learn from your example but I fear I&#039;m missing something obvious. Why is hParent not defined in your example?
To troubleshoot it myself, I tried creating an ActiveX object in guide, but I can&#039;t see MSCOMCTL in the list. (even after MSCOMCTL.OSX was successfully added to the registry in command prompt.)

It&#039;s probably a bkac problem, but it has been a few years since your post, so I wonder if Windows or Matlab has changed and broken your example. I&#039;m therefore not sure how much I should persist to get your example to work.]]></description>
			<content:encoded><![CDATA[<p>Hi Yair, big fan of your blog. Thank you for increasing the worlds productivity by a not insignificant margin.</p>
<p>On-topic then, I&#8217;m trying to learn from your example but I fear I&#8217;m missing something obvious. Why is hParent not defined in your example?<br />
To troubleshoot it myself, I tried creating an ActiveX object in guide, but I can&#8217;t see MSCOMCTL in the list. (even after MSCOMCTL.OSX was successfully added to the registry in command prompt.)</p>
<p>It&#8217;s probably a bkac problem, but it has been a few years since your post, so I wonder if Windows or Matlab has changed and broken your example. I&#8217;m therefore not sure how much I should persist to get your example to work.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-418635</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Mon, 22 Jan 2018 09:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-418635</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-418629&quot;&gt;Manju&lt;/a&gt;.

&lt;a href=&quot;http://undocumentedmatlab.com/blog/com-activex-tips#comment-418634&quot; rel=&quot;nofollow&quot;&gt;see here&lt;/a&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-418629">Manju</a>.</p>
<p><a href="http://undocumentedmatlab.com/blog/com-activex-tips#comment-418634" rel="nofollow">see here</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Manju		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-418629</link>

		<dc:creator><![CDATA[Manju]]></dc:creator>
		<pubDate>Mon, 22 Jan 2018 06:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-418629</guid>

					<description><![CDATA[Hi, 
How to access excel user form using actxserver.?]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
How to access excel user form using actxserver.?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: bahar		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-393094</link>

		<dc:creator><![CDATA[bahar]]></dc:creator>
		<pubDate>Sat, 12 Nov 2016 09:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-393094</guid>

					<description><![CDATA[Hi,I&#039;m a researcher at Control Engineering &#038; Industrial Automation, Now i&#039;m researching about how to connect a Fatek PLC to Matlab! I just used the interface program OPC server &#038; VB code ,but it couldn&#039;t answer .
can u help me how can i use my visual basic codes in matlab?
is there any way to export my vb codes?]]></description>
			<content:encoded><![CDATA[<p>Hi,I&#8217;m a researcher at Control Engineering &amp; Industrial Automation, Now i&#8217;m researching about how to connect a Fatek PLC to Matlab! I just used the interface program OPC server &amp; VB code ,but it couldn&#8217;t answer .<br />
can u help me how can i use my visual basic codes in matlab?<br />
is there any way to export my vb codes?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alan		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-351465</link>

		<dc:creator><![CDATA[Alan]]></dc:creator>
		<pubDate>Wed, 17 Jun 2015 06:58:47 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-351465</guid>

					<description><![CDATA[This is a very long and roundabout way to do something there&#039;s already a simple solution for in MATLAB:

In your VBS code, have the line:

    &lt;code&gt;Wscript.Echo MyOutputVariables&lt;/code&gt;

Where &quot;MyOutputVariables&quot; is your desired output

Then call from matlab with dos:

&lt;pre lang=&quot;matlab&quot;&gt;[status,message] = dos(&#039;cscript myvbsfile.vbs&#039;);&lt;/pre&gt;

Where myvbsfile.vbs is the name of your script. Message will contain the output you&#039;re looking for.

voila!

cscript is an alternative to wscript (Windows default for VBS files) which will output the command to a console (vice a message box) - in this case, the MATLAB console since it was called from MATLAB.

I tried this in 2015a, but I&#039;m sure it works in any version with the dos command and Windows version that supports cscript.]]></description>
			<content:encoded><![CDATA[<p>This is a very long and roundabout way to do something there&#8217;s already a simple solution for in MATLAB:</p>
<p>In your VBS code, have the line:</p>
<p>    <code>Wscript.Echo MyOutputVariables</code></p>
<p>Where &#8220;MyOutputVariables&#8221; is your desired output</p>
<p>Then call from matlab with dos:</p>
<pre lang="matlab">[status,message] = dos('cscript myvbsfile.vbs');</pre>
<p>Where myvbsfile.vbs is the name of your script. Message will contain the output you&#8217;re looking for.</p>
<p>voila!</p>
<p>cscript is an alternative to wscript (Windows default for VBS files) which will output the command to a console (vice a message box) &#8211; in this case, the MATLAB console since it was called from MATLAB.</p>
<p>I tried this in 2015a, but I&#8217;m sure it works in any version with the dos command and Windows version that supports cscript.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-350558</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 04 Jun 2015 10:50:23 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-350558</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-350554&quot;&gt;joseph smith&lt;/a&gt;.

@Joseph - contact me via email (altmany at gmail) if you need consulting assistance.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-350554">joseph smith</a>.</p>
<p>@Joseph &#8211; contact me via email (altmany at gmail) if you need consulting assistance.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: joseph smith		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-350554</link>

		<dc:creator><![CDATA[joseph smith]]></dc:creator>
		<pubDate>Thu, 04 Jun 2015 09:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-350554</guid>

					<description><![CDATA[I am developing an expert system based on fuzzy logic using matlab and vb.net. but i dont know how to link the symptoms highlighted by the patient and do the inferencing in matlab. i really need an assistance]]></description>
			<content:encoded><![CDATA[<p>I am developing an expert system based on fuzzy logic using matlab and vb.net. but i dont know how to link the symptoms highlighted by the patient and do the inferencing in matlab. i really need an assistance</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-345160</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 03 Feb 2015 06:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-345160</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-345157&quot;&gt;Ric&lt;/a&gt;.

You could try to  use Mex and interface via C++]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-345157">Ric</a>.</p>
<p>You could try to  use Mex and interface via C++</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ric		</title>
		<link>https://undocumentedmatlab.com/articles/running-vb-code-in-matlab#comment-345157</link>

		<dc:creator><![CDATA[Ric]]></dc:creator>
		<pubDate>Mon, 02 Feb 2015 23:02:25 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2174#comment-345157</guid>

					<description><![CDATA[I recently looked at RTD functionality in excel and realised it could be very interesting to port into matlab.
Making a bridge without making excel crash would give access to a number of services I would like to use.

Would ScriptControl be a good starting point? I also read about writing a wrapper in C# that would expose rtd functionality to COM and then it would be easy to interface. 

Any other hack you can think of?]]></description>
			<content:encoded><![CDATA[<p>I recently looked at RTD functionality in excel and realised it could be very interesting to port into matlab.<br />
Making a bridge without making excel crash would give access to a number of services I would like to use.</p>
<p>Would ScriptControl be a good starting point? I also read about writing a wrapper in C# that would expose rtd functionality to COM and then it would be easy to interface. </p>
<p>Any other hack you can think of?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
