View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] transferxxx@gmail.com is offline
external usenet poster
 
Posts: 31
Default Rename selected (highlighted) sheet with cell contents of sheets in cell A1

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