Automation to Excel from Access

B

Bob Barnes

This code..from Access..
objXLSheet.Columns("I:I").NumberFormat = "Short Date"
...or..
objXLSheet.Columns("I:I").NumberFormat = "mm/dd/yy"

...opens in Excel as the date's number, IE 39462

Ideas please? TIA - Bob
 
J

Jim Cone

"Short Date" not a valid NumberFormat in Excel.
However, It is valid when used with the Format function.

The "mm/dd/yy" NumberFormat is legitimate, but maybe it is being overridden
by the code that places the data in the column.
You might try altering when the numberformat is added to the column.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Bob Barnes"
wrote in message
This code..from Access..
objXLSheet.Columns("I:I").NumberFormat = "Short Date"
...or..
objXLSheet.Columns("I:I").NumberFormat = "mm/dd/yy"
...opens in Excel as the date's number, IE 39462
Ideas please? TIA - Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top