Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Naming a worksheet

Status
Not open for further replies.

ab123456

Chemical
Joined
Mar 18, 2003
Messages
58
Location
ES
I have a project containing hidden worksheets, depending on the users action I need to copy and modify a hidden worksheet. Both the original and modified sheet need to remain hidden.

I have used the code
'Sheets("BlankData").Copy Before:=Sheets(1)'
to copy the worksheet but i now wish to rename it

As the new sheet is hidden i cant use 'Activesheet' to refer to the new sheet. I have tried using Sheets(1) but again this only seems to refer to visible sheets.

Any ideas??

Thanks
 
You can refer to the new sheet as Sheets("BlankData (2)"), as in Sheets("BlankData (2)").Name = "NewName"

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top