petermeachem
Programmer
I'm producing an excel from vb. This shows driver's times for each day in the form 09:45 and a total. If I click on a cell containing 09:45, excel shows 09:45:00 in the edit box thing at the top and the cell format is Custom hh:mm. If the cell contains more than 24 hrs it shows 01/01/1900 13:15:00 for a time of 37.15.
I've tried various (many) formats to stop this like
vbExcel.ActiveWorkBook.Sheets(1).Range("D3
" & iRow + 3).NumberFormat = ???
but I can't find one that will tell Excel to just leave the thing alone and not to get all clever with my data.
If I record a macro to format a cell as text, the macro says
NumberFormat = "@"
This just gives me values like 1.52345
Well stuck, I now dislike excel as much as I dislike Crystal.
I've tried various (many) formats to stop this like
vbExcel.ActiveWorkBook.Sheets(1).Range("D3

but I can't find one that will tell Excel to just leave the thing alone and not to get all clever with my data.
If I record a macro to format a cell as text, the macro says
NumberFormat = "@"
This just gives me values like 1.52345
Well stuck, I now dislike excel as much as I dislike Crystal.