Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Insert Current Date on a Sheet 1 Tab

Good morning.

I have been trying to put a macro in place that will rename Sheet 1 tab to
the current date, every day, in many different new workbooks created daily.
I know the function =TODAY() however I can't seem to get that function to
take on the tab itself. I see that you can Insert an Excel Macro on the tab,
but I don't know how to create this either. I can get the Tab to read Macro1
- but then I don't know how to write that Macro.

I appreciate any input!
--
Thanks! Veronica.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Insert Current Date on a Sheet 1 Tab

I don't believe you can do that, but I've been proved wrong before. Try this:
http://www.mcgimpsey.com/excel/event...efromcell.html

You may get it to work with some modifications but I don't think it is going
to work with dates...


Regards,
Ryan--

--
RyGuy


"Veronica" wrote:

Good morning.

I have been trying to put a macro in place that will rename Sheet 1 tab to
the current date, every day, in many different new workbooks created daily.
I know the function =TODAY() however I can't seem to get that function to
take on the tab itself. I see that you can Insert an Excel Macro on the tab,
but I don't know how to create this either. I can get the Tab to read Macro1
- but then I don't know how to write that Macro.

I appreciate any input!
--
Thanks! Veronica.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Insert Current Date on a Sheet 1 Tab

hi
you can't name a sheet by a date because you can't use traditions date
seperators in the name.
these characters are forbidden by excel
:, /, \, *,[ ,]
you can name it with someting that looks like a date like'
2-12-2008 or Feb-12-2008
and that can be done with a macro.
Dim td As Date
Dim d As Long
Dim m As String
Dim y As Long
td = Date
d = Day(td)
m = Format(Month(td), "mmm")
y = Year(td)
Sheets("sheet1").Name = _
m & "-" & d & "-" & y

regards
FSt1
"Veronica" wrote:

Good morning.

I have been trying to put a macro in place that will rename Sheet 1 tab to
the current date, every day, in many different new workbooks created daily.
I know the function =TODAY() however I can't seem to get that function to
take on the tab itself. I see that you can Insert an Excel Macro on the tab,
but I don't know how to create this either. I can get the Tab to read Macro1
- but then I don't know how to write that Macro.

I appreciate any input!
--
Thanks! Veronica.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Insert Current Date on a Sheet 1 Tab

wow!!!


--
RyGuy


"FSt1" wrote:

hi
you can't name a sheet by a date because you can't use traditions date
seperators in the name.
these characters are forbidden by excel
:, /, \, *,[ ,]
you can name it with someting that looks like a date like'
2-12-2008 or Feb-12-2008
and that can be done with a macro.
Dim td As Date
Dim d As Long
Dim m As String
Dim y As Long
td = Date
d = Day(td)
m = Format(Month(td), "mmm")
y = Year(td)
Sheets("sheet1").Name = _
m & "-" & d & "-" & y

regards
FSt1
"Veronica" wrote:

Good morning.

I have been trying to put a macro in place that will rename Sheet 1 tab to
the current date, every day, in many different new workbooks created daily.
I know the function =TODAY() however I can't seem to get that function to
take on the tab itself. I see that you can Insert an Excel Macro on the tab,
but I don't know how to create this either. I can get the Tab to read Macro1
- but then I don't know how to write that Macro.

I appreciate any input!
--
Thanks! Veronica.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Insert Current Date on a Sheet 1 Tab

OK - I will give this a try.
--
Thanks! Veronica.


"FSt1" wrote:

hi
you can't name a sheet by a date because you can't use traditions date
seperators in the name.
these characters are forbidden by excel
:, /, \, *,[ ,]
you can name it with someting that looks like a date like'
2-12-2008 or Feb-12-2008
and that can be done with a macro.
Dim td As Date
Dim d As Long
Dim m As String
Dim y As Long
td = Date
d = Day(td)
m = Format(Month(td), "mmm")
y = Year(td)
Sheets("sheet1").Name = _
m & "-" & d & "-" & y

regards
FSt1
"Veronica" wrote:

Good morning.

I have been trying to put a macro in place that will rename Sheet 1 tab to
the current date, every day, in many different new workbooks created daily.
I know the function =TODAY() however I can't seem to get that function to
take on the tab itself. I see that you can Insert an Excel Macro on the tab,
but I don't know how to create this either. I can get the Tab to read Macro1
- but then I don't know how to write that Macro.

I appreciate any input!
--
Thanks! Veronica.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Insert Current Date on a Sheet 1 Tab

This definitely put a date on my Sheet 1. It is giving me January 12, 2008
however. Is there a way to tell the macro to always use a current date?
--
Thanks! Veronica.


"FSt1" wrote:

hi
you can't name a sheet by a date because you can't use traditions date
seperators in the name.
these characters are forbidden by excel
:, /, \, *,[ ,]
you can name it with someting that looks like a date like'
2-12-2008 or Feb-12-2008
and that can be done with a macro.
Dim td As Date
Dim d As Long
Dim m As String
Dim y As Long
td = Date
d = Day(td)
m = Format(Month(td), "mmm")
y = Year(td)
Sheets("sheet1").Name = _
m & "-" & d & "-" & y

regards
FSt1
"Veronica" wrote:

Good morning.

I have been trying to put a macro in place that will rename Sheet 1 tab to
the current date, every day, in many different new workbooks created daily.
I know the function =TODAY() however I can't seem to get that function to
take on the tab itself. I see that you can Insert an Excel Macro on the tab,
but I don't know how to create this either. I can get the Tab to read Macro1
- but then I don't know how to write that Macro.

I appreciate any input!
--
Thanks! Veronica.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Insert Current Date on a Sheet 1 Tab

That did it! Can't thank you all enough for your knowledge!!
Have a great day!
--
Veronica.


"Herbert Seidenberg" wrote:

Try
Sub NameShToday()
Dim td As Date
Dim d As Long
Dim e As Long
Dim m As String
Dim y As Long
td = Date
d = Day(td)
e = Month(td)
m = MonthName(e, 1)
y = Year(td)
Sheets("Sheet1").Name = _
m & "-" & d & "-" & y
End Sub


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
Can Excel automatically insert current date in a cell? AdrianXing Excel Worksheet Functions 25 April 3rd 23 07:42 PM
Insert Current Date when cell is empty?? Dazed&confused! Excel Worksheet Functions 4 February 7th 07 09:18 AM
How can I check a cell for current date and insert it if blank? Don K New Users to Excel 3 September 29th 06 02:46 PM
Any quick key to insert current Date and Time? Philip Excel Discussion (Misc queries) 2 January 12th 06 04:16 PM
How to insert a current date Tarakesh Excel Discussion (Misc queries) 0 August 16th 05 05:31 AM


All times are GMT +1. The time now is 11:30 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"