Changing Worksheet Tab Name Affects Macro

nhbartos

Board Regular
Joined
May 23, 2015
Messages
148
Hello...
Novice and new here...
I know how to very basically record a macro, but not where or how to insert fixes or work arounds.

Macro 1 creates a new data sheet by copying a template tab named "New Data Sheet" for each client as they come aboard, titled "New Data Sheet (2)".
Macro 2 runs after Macro 1 and it is supposed to link the data cells from the "New Data Sheet (2)" to a "Summary Sheet".

With me?

The problem is:

If I run the macro with the tab titled "New Data Sheet (2)", it works fine until I change the tab name to my clients name "Jones, Tom".
Even if I change the tab name to "Jones, Tom" first, the macro does not run at all.

So, it only works once.

I need a way to make the macro work regardless of tab name changes.

Is there a way for VB to maintain the linkage another way so I can change the tab names?

If so, I would appreciate the help and I would also need help knowing exactly how to insert the fix as I don't know the lingo well yet.

Thanks!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Pleas post the code for the first macro - you can have that rename the sheet to anything you like. It also sounds as though macro 2 should really be connected to, or called by, macro 1 - is there a reason it isn't?
 
Upvote 0

Forum statistics

Threads
1,216,522
Messages
6,131,146
Members
449,626
Latest member
Stormythebandit

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