Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add a worksheet with a name as a date

Hi all,

I use today() or now() to enter the current date into a cell. Then
today() is removed using Selection.PasteSpecial Paste:=xlPasteValues
leaving just the date.

I am now left with a date in the following format 15/10/03. I can
alter the format of this eg to 15th October 2003 but my problem is
that the underlying format remains the same.

This is a problem because when I create a worksheet using this date
(Sheets.Add.Name) I can not name a worksheet with the character / . I
know I can change my regional settings separator to something
different but then this will affect all my other excel programs.

I need to enter the system date (current) automatically so I can not
manually add as text the date.

Any thoughts would be appreciated.

Thanks,

John G
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Add a worksheet with a name as a date

Not totally sure what you're after, but have you
investigated the format function?

try this in the immediate window :

?now()

and then

?format(now(),"dd mmm yyyy")

you could then add a new worksheet like this :

set wkshtTemp=activeworkbook.Worksheets.Add
wkshtTemp.name="Sheet " & format(now(),"dd mmm yyyy")

anyway, I'm sure you can experiment

Regards

Rog


-----Original Message-----
Hi all,

I use today() or now() to enter the current date into a

cell. Then
today() is removed using Selection.PasteSpecial

Paste:=xlPasteValues
leaving just the date.

I am now left with a date in the following format

15/10/03. I can
alter the format of this eg to 15th October 2003 but my

problem is
that the underlying format remains the same.

This is a problem because when I create a worksheet using

this date
(Sheets.Add.Name) I can not name a worksheet with the

character / . I
know I can change my regional settings separator to

something
different but then this will affect all my other excel

programs.

I need to enter the system date (current) automatically

so I can not
manually add as text the date.

Any thoughts would be appreciated.

Thanks,

John G
.

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
Formula for returning date entered by date on another worksheet Tom Excel Worksheet Functions 2 January 29th 09 05:44 AM
Date of worksheet comes out numbers on other linked worksheet Deb A[_2_] Excel Worksheet Functions 2 July 16th 08 10:41 PM
copy date from worksheet to another worksheet (same File0 wamajkr Excel Discussion (Misc queries) 1 January 15th 07 03:32 PM
How do I copy a date in a worksheet cell to another worksheet? JennLee Excel Worksheet Functions 3 February 17th 06 05:38 PM
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM


All times are GMT +1. The time now is 10:06 PM.

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

About Us

"It's about Microsoft Excel"