View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Rename of sheets by macro

Why not do it all in one go when you add them

Sub Sheet_addition()
Dim i As Long
On Error GoTo endit
Application.ScreenUpdating = False
For i = 1 To 52
Sheets.Add after:=Sheets(i)
If i 1 Then ActiveSheet.Name = "NN" & i - 1
Next i
endit:
Sheets("Sheet1").Name = "Main"
Sheets("Sheet2").Name = "Content"
Sheets("Sheet3").Name = "Micro"
Sheets("Sheet4").Name = "Help"
Application.ScreenUpdating = True
End Sub

Mike

"Harshad" wrote:

i have Sheet1 to Sheet 55 in my workbook.

I want Sheet1 rename as Main, sheet2 as Content, sheet3 as Micro, sheet4 as
Help, sheet5 as NN1, sheet6 to sheet55 as NN2 to NN50.

Sugest macro.

Thanks