Good morning everyone - I am using VB6.
I need your assistance. I used the "CopyFromRecordset" function to populate my spreadsheet. Some of the fields in the access file has date values and some has number values (integers), but after importing into the spreadsheet, the numbers convert to date values(1/1/1900) and the date fields displays number values in the columns that was supposed to display dates.
I have used the code below to try and fix the problem and the numbers displays correctly, but the date values are still displaying numbers (integers).
My code:
Columns("A:A").Select
xlApp.Selection.NumberFormat = "###"
xlApp.Selection.Columns.AutoFit
<==This works fine.
Columns("L:L").Select
xlApp.Selection.NumberFormat = "mm/dd/yyyy"
xlApp.Selection.Columns.AutoFit
<==This does not work.
Thanks.
tgifgemini.