timesheet

D

dhaupert

I was wondering if there was a was to automatically name a sheet as a
date in a given cell. I am working on a time sheet. I have a pulldown
with the date. I would like to set the date then automatically rename
the sheet tab to the date selected.

I tried to record a macro, but there seems to be a problem accessing
the sheet name tab.

I am not a programmer and am just struggling to get this to work. Any
help would be appreciated. ( ie additional sources etc.)
 
T

Tom Ogilvy

Right click on the sheet tab of the sheet and select View Code.

Paste in this code in the resulting module

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
On Error Resume Next
Me.Name = Target.Text
On Error GoTo 0
End If
End Sub

Adjust $A$1 to reflect the cell that contains the name. This should work in
Xl2000 and later.
 
Top