Macro Buttons on Custom Toolbars

RTHoward

New Member
Joined
Oct 14, 2002
Messages
5
This issue was mentioned in a previous post but I would like to revive it (see http://www.mrexcel.com/board/viewtopic.php?topic=24955&forum=2)

Create a new template called 1.xlt Create a macro in 1.xlt , assign it to a button that is residing on a custom toolbar. Attach this custom toolbar to 1.xlt.

Now, create a new workbook from 1.xlt. Save this workbook as 1.xls. You will notice that the button is properly assigned to the macro residing in 1.xls. Everything is fine so far…

Now, close 1.xls and create another workbook from 1.xlt. Save this workbook as 2.xls. Now look at what macro your custom button is assign to. Notice that it is assigned to the macro in 1.xls instead of 2.xls. Why?!!!! The code exists in 2.xls, and I need the button to be assigned to the code in 2.xls.

Any solutions?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

k209310

Active Member
Joined
Aug 12, 2002
Messages
382
When i tried that i didnt have a problem.

Does the Macro name lcoation change when you save open a second .xls? It must originally be.

In the .xlt my macro was named macro1. in the xls the name chamed to '1xls'macro1 etc

I know this isnt very clear but i hope it helps.
 

RTHoward

New Member
Joined
Oct 14, 2002
Messages
5
I too created a macro in 1.xlt called Macro1. When I created 1.xls the macro location changed to 1.xls!Macro1. However, when I created 2.xls the assigned macro name was still 1.xls!Macro1.
 

Forum statistics

Threads
1,144,431
Messages
5,724,303
Members
422,543
Latest member
TimB_13

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top