LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Kdub via OfficeKB.com
 
Posts: n/a
Default Another Date Question

I have the following in a VBA add-in:

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

I use the last three lines to obtain a date in the format m/d/yyyy for
input to another process. Problem is, this doesn't always
work. I use the exact same code in various places in the
add-in. Sometimes it works, sometimes I don't get the format
I expect. I have just inserted the row - shouldn't this work
the same every time?

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
Date function question John Day Excel Discussion (Misc queries) 3 March 9th 05 03:55 PM
Date Format Question Josh O. Excel Discussion (Misc queries) 1 February 10th 05 09:45 PM
SUMPRODUCT with date range question Rob V Excel Discussion (Misc queries) 1 January 31st 05 03:55 PM
Cell / Date Formatting Question when result = -0- seve Excel Discussion (Misc queries) 3 January 17th 05 02:29 AM
Template / date question macamarr Excel Worksheet Functions 1 November 17th 04 06:24 AM


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