oxicottin
Learning by pecking away....
- Local time
- Today, 08:27
- Joined
- Jun 26, 2007
- Messages
- 883
I have a export to Excel and I keep getting an error message.
Runtime error '1004'
Numberformat method of Range failed
I and it takes me to a line in my code for a time field. The time in the excel workbook converts to 01/00/1900 for every record in the Excell workbook instead of the format from the query which the I convert time/date 04/18/2005 15:50:00 to 3:50pm using Test: TimeValue(TimeDelayBegan) in my query BUT in the workbook, it just converts the entire row to 01/00/1900 so I tried.
With XL
.Range("D1:H5000").NumberFormat = "hh:mm:ss"
End With
And that's what I get the '1004' error from. I also tried.
With XL
.Range("D1:H5000").SelectSelection.NumberFormat = "hh:mm:ss"
End With
And that didn't work either, I get an error '438' Doesn't support this property or method....
Thoughts?
Runtime error '1004'
Numberformat method of Range failed
I and it takes me to a line in my code for a time field. The time in the excel workbook converts to 01/00/1900 for every record in the Excell workbook instead of the format from the query which the I convert time/date 04/18/2005 15:50:00 to 3:50pm using Test: TimeValue(TimeDelayBegan) in my query BUT in the workbook, it just converts the entire row to 01/00/1900 so I tried.
With XL
.Range("D1:H5000").NumberFormat = "hh:mm:ss"
End With
And that's what I get the '1004' error from. I also tried.
With XL
.Range("D1:H5000").SelectSelection.NumberFormat = "hh:mm:ss"
End With
And that didn't work either, I get an error '438' Doesn't support this property or method....
Thoughts?