W
Walter
shtSup1.Names.Add Name:="Sup1_BCAPA_Ratings",
RefersTo:=Range("Arrow!$C$6,Arrow!$C$16,Arrow!$C$23,Arrow!$C$36,Arrow!$C$56"), Visible:=True
I have many lines of code that looks similar to the above line and I have
built a workbook template that I copy over to create a new tool for the end
user. Each time most of the worksheet names change and then I have to go
into the code and update the ranges to match.
My question is if I change the worksheet (tab) names can the code change to
reflect those changes. For example, rather than have Arrow in the above code
can there be a reference to the worksheet name so that anytime the workbook
sheet names are updated then the code changes accordingly. Seems to me this
would save time in updating the code each time the workbook is copied over.
Can I then protect worksheet names so other people cannot randomly change the
names?
Or is this a bad idea to code in this way?
RefersTo:=Range("Arrow!$C$6,Arrow!$C$16,Arrow!$C$23,Arrow!$C$36,Arrow!$C$56"), Visible:=True
I have many lines of code that looks similar to the above line and I have
built a workbook template that I copy over to create a new tool for the end
user. Each time most of the worksheet names change and then I have to go
into the code and update the ranges to match.
My question is if I change the worksheet (tab) names can the code change to
reflect those changes. For example, rather than have Arrow in the above code
can there be a reference to the worksheet name so that anytime the workbook
sheet names are updated then the code changes accordingly. Seems to me this
would save time in updating the code each time the workbook is copied over.
Can I then protect worksheet names so other people cannot randomly change the
names?
Or is this a bad idea to code in this way?