can a macro change the sheet name (the one in the VBA editor)

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,
as you all know every sheet has two names,
please excuse me for not know what there are both called

but as an example if i look in the VBA window at the sheets i see this "Sheet1 (Sheet1)"
so i know how to rename the second name (the one one that shows in the tab, but i need to change the first one?
can this be done and if so how
Thanks
Tony
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
You can change a worksheet's codename like this:

Sheet1.[_CodeName]="SomeNewName"

(Thanks to Jaafar Tribak for this - see Post #12 here - much easier than the alternatives that rely on the user's security settings)
Change Worksheet Codename
 
Upvote 0
Solution
Wow, this is huge,
thank you very much Stephen (and Jaafar) :)
Thanks
Tony
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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