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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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