<?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 Macros When a Workbook is Opened</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Yingjia</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-33319</link>
		<dc:creator>Yingjia</dc:creator>
		<pubDate>Fri, 04 Jul 2008 03:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-33319</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&#039;m creating an excel template that contains a macro which will show my userform when I run it.  The problem is, the moment i save the workbook as a Template, both the macro and the userform will not be saved in the template.&lt;/p&gt;
&lt;p&gt;I would also like to know how I may save a template on a shared drive and make it visible to all users.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m creating an excel template that contains a macro which will show my userform when I run it.  The problem is, the moment i save the workbook as a Template, both the macro and the userform will not be saved in the template.</p>
<p>I would also like to know how I may save a template on a shared drive and make it visible to all users.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronald Dodge</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-33285</link>
		<dc:creator>Ronald Dodge</dc:creator>
		<pubDate>Thu, 03 Jul 2008 00:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-33285</guid>
		<description>&lt;p&gt;I also have ran into an issue with Workbook_Open not working properly when opening up the workbook with a such code.  Generally it works fine, but there has been cases when the &quot;EnableEvents&quot; has been set to false for some strange reason (and no, this was not via code as I rarely ever use the property in code, though if debugging or it errored out and didn&#039;t get past such code to re-enable the events by setting this property back to true, then this would be one such case where it would cause the Open Event on the Workbook object to NOT work).&lt;/p&gt;
&lt;p&gt;As a result of this event not working properly in those unknown cases, I almost always use the &quot;Private Sub Auto_Open()&quot; within a standard module.  If we still need to have a such macro to work after opening up the workbook via code, I could then use the &quot;Application.Run&quot; method to run such code.  Of course, the Auto_Open procedure would only call on another procedure that is set to &quot;Public&quot;, so as the Application.Run method can see the procedure that it needs to run, given the &quot;Auto_Open&quot; procedure is set to Private as that is the only way I been able to get it to work properly.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I also have ran into an issue with Workbook_Open not working properly when opening up the workbook with a such code.  Generally it works fine, but there has been cases when the &#8220;EnableEvents&#8221; has been set to false for some strange reason (and no, this was not via code as I rarely ever use the property in code, though if debugging or it errored out and didn&#8217;t get past such code to re-enable the events by setting this property back to true, then this would be one such case where it would cause the Open Event on the Workbook object to NOT work).</p>
<p>As a result of this event not working properly in those unknown cases, I almost always use the &#8220;Private Sub Auto_Open()&#8221; within a standard module.  If we still need to have a such macro to work after opening up the workbook via code, I could then use the &#8220;Application.Run&#8221; method to run such code.  Of course, the Auto_Open procedure would only call on another procedure that is set to &#8220;Public&#8221;, so as the Application.Run method can see the procedure that it needs to run, given the &#8220;Auto_Open&#8221; procedure is set to Private as that is the only way I been able to get it to work properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-33273</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 02 Jul 2008 18:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-33273</guid>
		<description>&lt;p&gt;If you use events heavily in alot of workbooks, then it might be useful to have an Auto_Open to run the Workbook_Open actions if events have been disabled (perhaps from an uncaught error in a segment of code which had disabled events).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>If you use events heavily in alot of workbooks, then it might be useful to have an Auto_Open to run the Workbook_Open actions if events have been disabled (perhaps from an uncaught error in a segment of code which had disabled events).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-31092</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Tue, 04 Mar 2008 15:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-31092</guid>
		<description>&lt;p&gt;I have seen Excel 2000 9.0.3821.SR-1 have problems with the workbook_open event or other events such as activate not firing. Changing the security settings (Tools-Macro-Security) to Low did not help. The only thing that worked was reboot the computer. Then the events do happen again.&lt;br&gt;
I suspect it may have something to do with VBA running into an error. I have not been able to reproduce the problem.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I have seen Excel 2000 9.0.3821.SR-1 have problems with the workbook_open event or other events such as activate not firing. Changing the security settings (Tools-Macro-Security) to Low did not help. The only thing that worked was reboot the computer. Then the events do happen again.<br />
I suspect it may have something to do with VBA running into an error. I have not been able to reproduce the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kathy Miller</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-17585</link>
		<dc:creator>Kathy Miller</dc:creator>
		<pubDate>Wed, 30 Nov 2005 22:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-17585</guid>
		<description>&lt;p&gt;I just wrote an Auto_Open macro which also clears all filters upon opening the workbook. I tested the macro and it worked fine. When I advised my fellow associates of this macro  and to enable macros when opening this file, it did not work for them. I am trying to figure out why. I&#039;m wondering if it is because none of them have a macros toolbar on their machines? Can anyone think of any other possible reason? (It still works fine on my machine, and everyone accesses this file thru the network. I have not saved it as a shared workbook, could this also pose a problem?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I just wrote an Auto_Open macro which also clears all filters upon opening the workbook. I tested the macro and it worked fine. When I advised my fellow associates of this macro  and to enable macros when opening this file, it did not work for them. I am trying to figure out why. I&#8217;m wondering if it is because none of them have a macros toolbar on their machines? Can anyone think of any other possible reason? (It still works fine on my machine, and everyone accesses this file thru the network. I have not saved it as a shared workbook, could this also pose a problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronan</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-2197</link>
		<dc:creator>Ronan</dc:creator>
		<pubDate>Tue, 07 Sep 2004 10:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-2197</guid>
		<description>&lt;p&gt;It worked! :) Thanks (I just subbed AUTO_OPEN() in for module name)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It worked! <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thanks (I just subbed AUTO_OPEN() in for module name)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RMG</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-2196</link>
		<dc:creator>RMG</dc:creator>
		<pubDate>Tue, 07 Sep 2004 00:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-2196</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to bulk add the same Workbook_ Open procedure to about 120 different Workbooks. I cannot do it though. I was trying to do so using&lt;/p&gt;
&lt;p&gt;Set VBP = ActiveWorkbook.VBProject&lt;/p&gt;
&lt;p&gt;With VBP.VBComponents&lt;br&gt;
     .Import Filename&lt;/p&gt;
&lt;p&gt;RMG&lt;/p&gt;
&lt;p&gt;&#039;where filename contains a Sub Workbook_Open()&lt;br&gt;
procedure&lt;/p&gt;
&lt;p&gt;However, the .Import Filename diesn&#039;t work. I can bulk add this as a module for each individual spreadsheet and import the file to a module but this doesn&#039;t work - i need the code to work when the file is opened. Could I adapt your auto_run() code above?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am trying to bulk add the same Workbook_ Open procedure to about 120 different Workbooks. I cannot do it though. I was trying to do so using</p>
<p>Set VBP = ActiveWorkbook.VBProject</p>
<p>With VBP.VBComponents<br />
     .Import Filename</p>
<p>RMG</p>
<p>&#8216;where filename contains a Sub Workbook_Open()<br />
procedure</p>
<p>However, the .Import Filename diesn&#8217;t work. I can bulk add this as a module for each individual spreadsheet and import the file to a module but this doesn&#8217;t work &#8211; i need the code to work when the file is opened. Could I adapt your auto_run() code above?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Springer</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-2195</link>
		<dc:creator>Richard Springer</dc:creator>
		<pubDate>Fri, 27 Aug 2004 16:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-2195</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Once the Workbook_Open macro has been put into a workbook is it possible to open that workbook without the macro running. &lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Once the Workbook_Open macro has been put into a workbook is it possible to open that workbook without the macro running. </p>
<p>Any ideas?</p>
<p>Thank you very much.</p>
<p>Richard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-2194</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 19 Aug 2004 01:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-2194</guid>
		<description>&lt;p&gt;Back to the Auto_Open vs. Workbook_Open debate, when I was first learning this newfangled VBA, some old timers claimed that there were issues with Workbook_Open not always working correctly. I didn&#039;t know what it was back then, and I don&#039;t know what it might have been, looking back now. I always use Workbook_Open, never Auto_Open, and I don&#039;t think I&#039;ve ever had any difficulties.&lt;/p&gt;
&lt;p&gt;- Jon&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Back to the Auto_Open vs. Workbook_Open debate, when I was first learning this newfangled VBA, some old timers claimed that there were issues with Workbook_Open not always working correctly. I didn&#8217;t know what it was back then, and I don&#8217;t know what it might have been, looking back now. I always use Workbook_Open, never Auto_Open, and I don&#8217;t think I&#8217;ve ever had any difficulties.</p>
<p>- Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Miller</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/18/running-macros-when-a-workbook-is-opened/#comment-2193</link>
		<dc:creator>Andy Miller</dc:creator>
		<pubDate>Wed, 18 Aug 2004 22:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=726#comment-2193</guid>
		<description>&lt;p&gt;Krishnan, make sure that you don&#039;t have absolute references in your formula. If there are any dollar signs, remove them from the top formula before copying it down.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Krishnan, make sure that you don&#8217;t have absolute references in your formula. If there are any dollar signs, remove them from the top formula before copying it down.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

