View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Renaming Worksheet

here are 2 examples, one using activesheet and one using the index number, which
is the first sheet in this case:

Sub rename_sheet()
With Worksheets(1)
..Name = .Range("B1").Value
End With
End Sub

Sub rename_sheet()
With ActiveSheet
..Name = .Range("B1").Value
End With
End Sub


--


Gary

"Noepie" wrote in message
...
Hello all,

I have the following problem which I'd like to solve with a macro. Is it
possible to run a macro that renames the worksheet with the text I put in
this worksheet in cell B1, e.g.? I hope there is a solution.

Thanx for your help.

Kind regards,

Noepie