Macro to change text in macro on control button in workbook?

Rookeby7

New Member
Joined
Jul 5, 2019
Messages
18
I have inherited a process which has a template workbook with Macro buttons so users can move to specific sheets.

The template has been used to create approx 700 files.

I have been making some amendments to the template, which has included changing one of the worksheet names - this means one of the macro buttons no longer works as it is looking for a sheet which no longer exists.

:confused: Is it possible to create a macro to open an embedded macro and find/repalce the sheet name? (and loop through 700 files?)

:confused: Or is it possible to assign a new macro to the existing button? (and loop through 700 files?)

Hope someone can help, thanks in advance
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
How about amending the macro so that it is looking for the correct sheet ?
 
Upvote 0
If the sheet codename is the same for all files, just change your macro to refer to the codename instead of the sheet tab name.
 
Last edited:
Upvote 0
How about amending the macro so that it is looking for the correct sheet ?


Yes I have done for my "new template" but I am looking for the best way to run the modifications in to all the existing workbooks.

One of the changes is the change of sheet name, so I'm looking for most efficient way to reflect the change of sheet name and update the macro assigned to the button so the macro button works takes user to newly named sheet.

I am new to the world of Macros and the idea of coding a macro to edit another macro is baffling me, but I suspect it is possible...
 
Upvote 0
If the sheet codename is the same for all files, just change your macro to refer to the codename instead of the sheet tab name.


thanks I will have a look at this

but can you suggest what would be the best way to make this change to the same macro in each of the 700 individual files?
 
Upvote 0
Would it not be simpler to change the sheet name back to the original name ?
 
Upvote 0
thanks I will have a look at this

but can you suggest what would be the best way to make this change to the same macro in each of the 700 individual files?

If the tab names have not been changed in the 700 files, why do you need to change the macros in those files?
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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