LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Date not Saving As Expected

I have this code in a VBA module:

Rows(1).Insert
Range("A1").Value = "H"
Range("B1").Value = SheetName
Range("C1").Value = Date
Range("C1").NumberFormat = "m/dd/yyyy"
Range("C1").NumberFormat = "@"

When debugging, it returns the correct date,
yet when I view the modified worksheet, this
date is displayed as a number, then stored as
one. How can I ensure that it is saved in m/dd/yyyy
format? I've tried this with and without that last NumberFormat
statement with the same result.

Kevin

--
Message posted via http://www.officekb.com
 
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
saving a file with a date pat67 Excel Worksheet Functions 3 October 8th 09 08:39 PM
Saving with name and date macro Bobby Excel Discussion (Misc queries) 4 December 25th 08 03:37 PM
save as future date eg expected delivery date ryan Excel Discussion (Misc queries) 0 June 21st 07 03:35 PM
Modify Date Changes when NOT saving LoriStar Excel Discussion (Misc queries) 1 December 10th 04 12:14 AM
Saving with date in filename Ben Allen Excel Programming 3 April 26th 04 09:05 AM


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