View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Date not Saving As Expected

It may store it to appear as the correct format, but it isn't being stored
as a date value - at least not running your code in xl2003, US English.

--
Regards,
Tom Ogilvy

"Kdub via OfficeKB.com" wrote in message
...
Thanks for you help, but that gave me the same result. Here
is what I found that works:

Rows(1).Insert
Range("A1").Value = "H"
Range("B1").Value = SheetName
Range("C1").NumberFormat = "@"
Range("C1") = Format(Date, ("MM/DD/YYYY"))

If I format the cell as text before storing the formatted date,
it stores my date in the correct format.
Thanks for the help.

Kevin

--
Message posted via http://www.officekb.com