Rename selected (highlighted) sheet with cell contents of sheets in cell A1

  • Thread starter Thread starter transferxxx
  • Start date Start date
T

transferxxx

How can i modify macro below - to make it work for only sheets i've
selected (group) - instead of all sheets in active workbook.

Sub RenameWS()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
ws.Name = Range("A1").Value
Next
End Sub

Thxs
 
Sub RenameWS()
Dim ws As Worksheet
For Each ws In ActiveWindow.SelectedSheets
ws.Activate
ws.Name = Range("A1").Value
Next
End Sub

Cheers,
Joerg Mochikun
 
thxs!!

Sub RenameWS()
Dim ws As Worksheet
For Each ws In ActiveWindow.SelectedSheets
ws.Activate
ws.Name = Range("A1").Value
Next
End Sub

Cheers,
Joerg Mochikun
 
Back
Top