mike637
asked on
Excel VBA set sheet name at auto_open routine
Hello Experts.
I have my auto_open routine set - but I want to add additional code to ensure that my sheet names were not changed by an enduser. If they were changed - then I want to reset them back to their original name on open. I do not have the workbook protected, just the individual sheets.
I have 5 worksheets where the name should stay the same. (The code.names are no longer sheet1 sheet 2) The code.names are set as follows:
week1, week2, week3, week4 & week5
In my open routine - I want to rename any worksheet that may have been changed by referencing it by it's codename. Listed below are the code.name with the respective worksheet names.
week1 = "week 1"
week2 = "week 2"
etc. etc.
Is this possible to do this?
Thank you,
Michael
I have my auto_open routine set - but I want to add additional code to ensure that my sheet names were not changed by an enduser. If they were changed - then I want to reset them back to their original name on open. I do not have the workbook protected, just the individual sheets.
I have 5 worksheets where the name should stay the same. (The code.names are no longer sheet1 sheet 2) The code.names are set as follows:
week1, week2, week3, week4 & week5
In my open routine - I want to rename any worksheet that may have been changed by referencing it by it's codename. Listed below are the code.name with the respective worksheet names.
week1 = "week 1"
week2 = "week 2"
etc. etc.
Is this possible to do this?
Thank you,
Michael
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks, Michael!
ASKER
Thank you Brian!