Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Rename sheet with NOW date

I have a macro recorded that creates a new worksheet (each day) and it will
allow me to rename the new sheet, but I cannot figure out how to make it put
the date "NOW" in as the new worksheet's name and leave it named that date
forever. Can anyone tell me how to do it?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Rename sheet with NOW date

Once the new sheet has been activated, run:

Sub name_it()
ActiveSheet.Name = Format(Now, "mm-dd-yyyy")
End Sub

--
Gary's Student
gsnu200701


"Publius" wrote:

I have a macro recorded that creates a new worksheet (each day) and it will
allow me to rename the new sheet, but I cannot figure out how to make it put
the date "NOW" in as the new worksheet's name and leave it named that date
forever. Can anyone tell me how to do it?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Rename sheet with NOW date

One way:

Worksheets.Add.Name = Format(Date, "dd mmm yyyy")


In article ,
Publius wrote:

I have a macro recorded that creates a new worksheet (each day) and it will
allow me to rename the new sheet, but I cannot figure out how to make it put
the date "NOW" in as the new worksheet's name and leave it named that date
forever. Can anyone tell me how to do it?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Rename sheet with NOW date

Thanks! Worked like a charm.

"Gary''s Student" wrote:

Once the new sheet has been activated, run:

Sub name_it()
ActiveSheet.Name = Format(Now, "mm-dd-yyyy")
End Sub

--
Gary's Student
gsnu200701


"Publius" wrote:

I have a macro recorded that creates a new worksheet (each day) and it will
allow me to rename the new sheet, but I cannot figure out how to make it put
the date "NOW" in as the new worksheet's name and leave it named that date
forever. Can anyone tell me how to do it?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Rename sheet with NOW date

Sub sheetname1()
Worksheets.Add.Name = Format(Now(), "dddd-mmm-yy")
End Sub

NOTE: can be done only once a day.


Gord Dibben MS Excel MVP

On Fri, 12 Jan 2007 13:37:00 -0800, Publius
wrote:

I have a macro recorded that creates a new worksheet (each day) and it will
allow me to rename the new sheet, but I cannot figure out how to make it put
the date "NOW" in as the new worksheet's name and leave it named that date
forever. Can anyone tell me how to do it?


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
Named Ranges Epinn Excel Worksheet Functions 23 October 16th 06 07:27 AM
Mileage Claim Formula johndavies New Users to Excel 4 August 14th 06 09:24 AM
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
search for latest date Sue Excel Worksheet Functions 2 August 2nd 05 11:09 PM
Does excel recognise names rather than cells? Sue Excel Worksheet Functions 9 May 22nd 05 04:51 AM


All times are GMT +1. The time now is 04:13 PM.

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"