<?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: How To: Assign a Macro to a Button or Shape</title>
	<atom:link href="http://peltiertech.com/WordPress/how-to-assign-a-macro-to-a-button-or-shape/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/how-to-assign-a-macro-to-a-button-or-shape/</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Fri, 10 Feb 2012 23:37:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/how-to-assign-a-macro-to-a-button-or-shape/comment-page-2/#comment-178859</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 03 Feb 2012 18:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/12/how-to-assign-a-macro-to-a-button-or-shape/#comment-178859</guid>
		<description>Mark -

I think when you use Application.Run, the workbook with the procedure in it has to be open.</description>
		<content:encoded><![CDATA[<p>Mark -</p>
<p>I think when you use Application.Run, the workbook with the procedure in it has to be open.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark T</title>
		<link>http://peltiertech.com/WordPress/how-to-assign-a-macro-to-a-button-or-shape/comment-page-2/#comment-178594</link>
		<dc:creator>Mark T</dc:creator>
		<pubDate>Thu, 02 Feb 2012 20:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/12/how-to-assign-a-macro-to-a-button-or-shape/#comment-178594</guid>
		<description>OK, I just tried that... unfortunately, I got an error message telling me that &quot;the macro may not be available in this Workbook, or all macros have been disabled&quot;.

I don&#039;t think this is a macro security issue, as this will work when accessed directly from the &quot;Macro Name&quot; text in the button.  Are you still supposed to use an exclamation point between the path name and the macro name?</description>
		<content:encoded><![CDATA[<p>OK, I just tried that&#8230; unfortunately, I got an error message telling me that &#8220;the macro may not be available in this Workbook, or all macros have been disabled&#8221;.</p>
<p>I don&#8217;t think this is a macro security issue, as this will work when accessed directly from the &#8220;Macro Name&#8221; text in the button.  Are you still supposed to use an exclamation point between the path name and the macro name?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/how-to-assign-a-macro-to-a-button-or-shape/comment-page-2/#comment-178369</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 02 Feb 2012 01:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/12/how-to-assign-a-macro-to-a-button-or-shape/#comment-178369</guid>
		<description>Mark -

Save the path and sub name in a cell or in a constant in your module. When the button is clicked, have it run this code:

Application.Run(strMacro)

strMacro is either  the constant, or a string variable defined by:

strMacro = activesheet.range(cell address containing path/sub).value</description>
		<content:encoded><![CDATA[<p>Mark -</p>
<p>Save the path and sub name in a cell or in a constant in your module. When the button is clicked, have it run this code:</p>
<p>Application.Run(strMacro)</p>
<p>strMacro is either  the constant, or a string variable defined by:</p>
<p>strMacro = activesheet.range(cell address containing path/sub).value</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark T</title>
		<link>http://peltiertech.com/WordPress/how-to-assign-a-macro-to-a-button-or-shape/comment-page-2/#comment-178343</link>
		<dc:creator>Mark T</dc:creator>
		<pubDate>Wed, 01 Feb 2012 22:47:56 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/12/how-to-assign-a-macro-to-a-button-or-shape/#comment-178343</guid>
		<description>Hi, Jon.  I haven&#039;t had much luck finding an answer to this question; maybe you can help.

I currently have a button set up in an Excel 2007 document (let&#039;s call this Spreadsheet A) to execute a macro on our company network (stored in Spreadsheet B).  In the &quot;Macro Name&quot; field, the full path of Spreadsheet B is defined alongside the Subroutine.  The macro works fine when I leave Spreadsheet A in its original location.  The problem arises when I copy &amp; paste Spreadsheet A elsewhere... when I do this, Microsoft automatically resets the path of Spreadsheet B to match the new location of Spreadsheet A.

I do not want to do this.  I just want to leave Spreadsheet B alone, and preserve the path within Spreadsheet A.  (Interestingly, this path name is preserved when I do a &quot;Save As&quot;, but not when I copy &amp; paste in Windows Explorer).

Do you have any suggestions as to how I might fix this problem?  Is there a way to &quot;lock&quot; the path name in place?</description>
		<content:encoded><![CDATA[<p>Hi, Jon.  I haven&#8217;t had much luck finding an answer to this question; maybe you can help.</p>
<p>I currently have a button set up in an Excel 2007 document (let&#8217;s call this Spreadsheet A) to execute a macro on our company network (stored in Spreadsheet B).  In the &#8220;Macro Name&#8221; field, the full path of Spreadsheet B is defined alongside the Subroutine.  The macro works fine when I leave Spreadsheet A in its original location.  The problem arises when I copy &amp; paste Spreadsheet A elsewhere&#8230; when I do this, Microsoft automatically resets the path of Spreadsheet B to match the new location of Spreadsheet A.</p>
<p>I do not want to do this.  I just want to leave Spreadsheet B alone, and preserve the path within Spreadsheet A.  (Interestingly, this path name is preserved when I do a &#8220;Save As&#8221;, but not when I copy &amp; paste in Windows Explorer).</p>
<p>Do you have any suggestions as to how I might fix this problem?  Is there a way to &#8220;lock&#8221; the path name in place?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paulchiu</title>
		<link>http://peltiertech.com/WordPress/how-to-assign-a-macro-to-a-button-or-shape/comment-page-1/#comment-170735</link>
		<dc:creator>paulchiu</dc:creator>
		<pubDate>Thu, 05 Jan 2012 17:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/12/how-to-assign-a-macro-to-a-button-or-shape/#comment-170735</guid>
		<description>i gave up.
i am running the macros manually.</description>
		<content:encoded><![CDATA[<p>i gave up.<br />
i am running the macros manually.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/how-to-assign-a-macro-to-a-button-or-shape/comment-page-1/#comment-170221</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Wed, 04 Jan 2012 04:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/12/how-to-assign-a-macro-to-a-button-or-shape/#comment-170221</guid>
		<description>If all sheets are selected, you cannot change the protection of the sheets.</description>
		<content:encoded><![CDATA[<p>If all sheets are selected, you cannot change the protection of the sheets.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

