Good Morning Experts,
I received a macro that I thought would take the data from a specific cell (B7 in this case) and transfer that same data as the tab name on the active worksheet. I go to find that the macro will only run if every sheet in the worksheet contains data in cell B7, then every tab name will change. For my projects, I only need this to work on the active worksheet only. I do not have data in B7 on every worksheet and I definitely do not want to change the name on every tab. Below is the macro, but I do not know how to modify it so it only works on the active worksheet. Any help would be appreciated. Thanks much!
Joe
Sub ChangeSheetNames()
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In Sheets
If Not Evaluate("isref('" & ws.Range("B7") & "'!A1)") Then
ws.Name = ws.Range("B7")
End If
Next ws
Application.ScreenUpdating = True
End Sub
Bookmarks