Hi There,
I have a large work book and continually add new sheets which are renamed using this code:
Sub RenameSheet()
Dim rs As Worksheet
For Each rs In Sheets
rs.Name = rs.Range("B9")
Next rs
End Sub
But it takes ages as it have more than 20 sheets and goes through them all.
As every sheet I add before I run the code is named:
sheet2, sheet3, sheet4 and so on, can someone help me to wrap a loop around this code to only rename the newly inserted sheets?
Thanks!
I have a large work book and continually add new sheets which are renamed using this code:
Sub RenameSheet()
Dim rs As Worksheet
For Each rs In Sheets
rs.Name = rs.Range("B9")
Next rs
End Sub
But it takes ages as it have more than 20 sheets and goes through them all.
As every sheet I add before I run the code is named:
sheet2, sheet3, sheet4 and so on, can someone help me to wrap a loop around this code to only rename the newly inserted sheets?
Thanks!