View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Renaming sheets from a list in a column

Hello Max,
'-----------------------
Sub ChewingGum()
Dim objSht As Object
Dim lngNum As Long
lngNum = 1
For Each objSht In Sheets
On Error Resume Next
objSht.Name = Cells(lngNum, 1).Value
On Error GoTo 0
lngNum = lngNum + 1
Next 'objSht
Set objSht = Nothing
End Sub
'-------------------------
Regards,
Jim cone
San Francisco, USA


"Max" wrote in message
...
And should there be any invalid or duplicate names in A1:A50 encountered
along the way (although the list will be checked carefully before the run),
just skip over these in the sheet renaming process.
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----