Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to rename all worksheets with cell value in each sheet
Hi guys,
I need help for a macro to loop through all worksheets (identical structure), copy the contents of B2 and rename the sheet with it, all at one go. B2 will hold text (different for each sheet). I'm using xl97. TIA Max |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to rename all worksheets with cell value in each sheet
Many thanks, Neil!
It runs smoothly. Neil wrote in message ... Max, Try this Sub RenameWS() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ws.Activate ws.Name = Range("B2").Value Next End Sub Neil "Max" wrote in message ... Hi guys, I need help for a macro to loop through all worksheets (identical structure), copy the contents of B2 and rename the sheet with it, all at one go. B2 will hold text (different for each sheet). I'm using xl97. TIA Max |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i create a macro to rename worksheets in excel? | Excel Discussion (Misc queries) | |||
Macro REQ: Automatically copy a template sheet and rename | Excel Worksheet Functions | |||
macro to: Add new sheet, then rename new sheet with todays date | Excel Worksheet Functions | |||
Rename Sheet using Cell Reference | Excel Worksheet Functions | |||
How do I automatically rename a sheet with the contents of a cell. | Excel Discussion (Misc queries) |