MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Sheet Tabs with VBA


Posted by Paul Magruder on December 22, 2000 4:30 AM

Is there code that will select the ActiveSheets Tab, without using the sheets "name"? I need to be ale to rename each sheet after I insert it, on a weekly basis (from sheet5, or sheet6 to wk1, wk2,ect.),without changing the macro each week. The Name I will give the sheet will be in cell a1 of the active sheet.
I am using Excel 97......

Thanks in Advance
Paul Magruder


Posted by Celia on December 22, 2000 4:40 AM


The tab of the active sheet is already highlighted, so if you want the active sheet to be re-named to the value in cell A1 then :-

ActiveSheet.Name=Range("A1")

Celia