Carin
Board Regular
- Joined
- Feb 4, 2006
- Messages
- 224
I need to rename worksheets based on cell A1 and found this code in this forum from 2004. I'm currently using 2010. The macro works great but generates a Run-Time error at the end. Does anyone know a workaround?
'Sub Rep()
For Each sht In ThisWorkbook.Worksheets
sht.Name = sht.Range("A1")
Next sht
End Sub
'Sub Rep()
For Each sht In ThisWorkbook.Worksheets
sht.Name = sht.Range("A1")
Next sht
End Sub