Hello!
I am having trouble running a macro that was written to re-name the tabs in a worksheet.
It comes up with a box and "400".
Now my main source of confusion is that I have the exact same code & references in another spreadsheet and it works 100% fine.
Does anyone know what could be causing this to stop working in this particular spreadsheet?
Many many thanks in advance.
Oh, and this is the code I am using.
Sub RenameTabs()
For x = 1 To Sheets.Count
If Worksheets(x).Range("A4").Value <> "" Then
Sheets(x).Name = Worksheets(x).Range("A4").Value
End If
Next
End Sub
I am having trouble running a macro that was written to re-name the tabs in a worksheet.
It comes up with a box and "400".
Now my main source of confusion is that I have the exact same code & references in another spreadsheet and it works 100% fine.
Does anyone know what could be causing this to stop working in this particular spreadsheet?
Many many thanks in advance.
Oh, and this is the code I am using.
Sub RenameTabs()
For x = 1 To Sheets.Count
If Worksheets(x).Range("A4").Value <> "" Then
Sheets(x).Name = Worksheets(x).Range("A4").Value
End If
Next
End Sub