Worksheet Tab Name

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

In a workbook I have a bunch of sheets that need to named
a date which is contained in a cell in each sheet. The
date changes so I need the sheet name at the bottom to
reflect this change. Any help on how to accomplish this
would be appreciated.

Thanks
Joe
 
Hi
you'll need VBA for this(an event procedure: see
http://www.cpearson.com/excel/events.htm for more details): Put the
following code in your worksheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo CleanUp
application.enableevents = false
With Target
If .Value <> "" Then
Me.Name = format(.Value,"MM_DD_YYYY")
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub
 
Back
Top