Macros on customize ribbon

caselton

New Member
Joined
Apr 21, 2018
Messages
13
Hi All
I have a query please
I have lots of macros on program ive made for work, and i noticed that i could add a link to run the macros on the ribbon, which is brilliant
However, as i have a master macro enabled -file and whenever i use the design spreadsheet for a new project i save as.
But when i press the button to run the macro on the new saved as version, it keeps trying to open the original master file and its not workable like this.

Is there a way to ensure that the command buttons on the ribbon run the macros in the workbook that is open only please
(or effectively unlink it from the original)

Many thanks in advance
Jason
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi Jason
When you add a button to the ribbon for a macro it is attached to the file it sits in at the time of adding. If you save the macro file as another file it leaves the buttons as they were. I have a similar situation, I have one file with all my macros in it and I have it saved as an add-in, xlam, file and I have it added as an addin to be opened when excel opens.
Simplest thing is to keep the same filename for your macros. Save versions as you need but keep the one you use with the same name.

If you want to update the file you refer to for the macros there's a fairly simple way.
When you're customising the ribbon you can export your customisations. Do this, the export is an xml file.
You can then open the export in notepad and search/replace the old macro filename for new
then import the customisations and your buttons will point to the new file.
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

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
Back
Top