longestdrive
Programmer
Hi All
I'm stuck on a simple task.
I can format a range of cells in excel to set a descriptor after the number. using the number format 0.0 "hrs".
However I want to repeat the format using vba via numberformat. I'm referencing excel via MS Project
i've used this code:
.NumberFormat = "0.0 hrs"
When run it comes up with an error stating number format invalid.
I've tried
.NumberFormat = "0.0 'hrs'" but again invalid
How can I set the number format to use a unique descriptor?
Thank you for your help
I'm stuck on a simple task.
I can format a range of cells in excel to set a descriptor after the number. using the number format 0.0 "hrs".
However I want to repeat the format using vba via numberformat. I'm referencing excel via MS Project
i've used this code:
.NumberFormat = "0.0 hrs"
When run it comes up with an error stating number format invalid.
I've tried
.NumberFormat = "0.0 'hrs'" but again invalid
How can I set the number format to use a unique descriptor?
Thank you for your help