Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Changing a sheet name to the current date

Hi. I am trying to rename a new sheet to the current date, using the
"15-Mar-06" format, but I keep getting an error whenever I hit this line of
code:

ActiveSheet.Name = ActiveSheet.Range("H3").Value

....where H3.value is the current date. I think its seeing the "/"s in the
date and not wanting to accept the value, even though I have a line above
where I change the format of the date in that H3 cell. Name = Date doesn't
work either, I think for the same reason.

Any ideas?

thanks oodles!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Changing a sheet name to the current date

Try this:

ActiveSheet.Name = Format(ActiveSheet.Range("H3").Value,"dd-mmm-yy")



"Reddist" wrote:

Hi. I am trying to rename a new sheet to the current date, using the
"15-Mar-06" format, but I keep getting an error whenever I hit this line of
code:

ActiveSheet.Name = ActiveSheet.Range("H3").Value

...where H3.value is the current date. I think its seeing the "/"s in the
date and not wanting to accept the value, even though I have a line above
where I change the format of the date in that H3 cell. Name = Date doesn't
work either, I think for the same reason.

Any ideas?

thanks oodles!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Changing a sheet name to the current date

That works perfectly. Thanks!

"Eric White" wrote:

Try this:

ActiveSheet.Name = Format(ActiveSheet.Range("H3").Value,"dd-mmm-yy")



"Reddist" wrote:

Hi. I am trying to rename a new sheet to the current date, using the
"15-Mar-06" format, but I keep getting an error whenever I hit this line of
code:

ActiveSheet.Name = ActiveSheet.Range("H3").Value

...where H3.value is the current date. I think its seeing the "/"s in the
date and not wanting to accept the value, even though I have a line above
where I change the format of the date in that H3 cell. Name = Date doesn't
work either, I think for the same reason.

Any ideas?

thanks oodles!

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
Insert Current Date on a Sheet 1 Tab Veronica Excel Worksheet Functions 6 February 13th 08 04:30 PM
formula for current date when opening spread sheet terryman Excel Worksheet Functions 2 December 9th 06 07:09 PM
a Month to Date and Year TD page in one sheet changing each day? Mark A. Fresh Excel Discussion (Misc queries) 1 January 5th 06 10:59 AM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM
changing current directory to that of the current open file unnameable Excel Programming 2 May 19th 04 11:14 AM


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