Worksheet Tab Name from Cell C4
In the VBEditor, put the following in the worksheet to be copied.
Everytime you go to that worksheet, the macro will fire and change the
worksheet's name to whatever is in cell C4 of that worksheet. If the name is
illegal, the worksheet will not change the name.
Private Sub Worksheet_Activate()
On Error Resume Next
ActiveSheet.Name = Range("C4").Value
End Sub
--
Hope this helps.
If this post was helpfull, please remember to click on the ''YES'' button at
the bottom of the screen.
Thanks,
Gary Brown
"JAK" wrote:
I have a worksheet that I would like to have the Tab automatically rename
itself to whatever value is in Cell C4. This worksheet will be copied (via
copy worksheet macro) multiple times (move to end with create a copy option
checked). I have never used VBA in Excel so I am not sure how to make this
work. I tried using what you had suggested for Wally but couldn't make that
work for me.
|