#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default timesheet

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.)


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default timesheet

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.

--
Regards,
Tom Ogilvy


"dhaupert " wrote in message
...
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.)


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
timesheet Andy Bolger Excel Discussion (Misc queries) 2 September 23rd 09 12:03 PM
Timesheet JM[_2_] Excel Discussion (Misc queries) 2 December 6th 07 05:17 PM
Timesheet Matt Excel Discussion (Misc queries) 3 September 15th 05 10:14 PM
Timesheet help kimmyrt Excel Worksheet Functions 3 March 22nd 05 04:34 AM
TIMESHEET 3Throks Excel Programming 1 January 23rd 04 11:51 AM


All times are GMT +1. The time now is 02:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"