Can I conditionally format tab names in excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking to automatically name the tabs in my spreadsheet based on a
name/data within that worksheet. Is this possible
 
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

On Error GoTo wb_exit
Application.EnableEvents = False

With Target
If .Address = "$H$1" Then
Sh.Name = .Value
End If
End With

wb_exit:
Application.EnableEvents = True
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top