« Return to the main article
Off the top of my head, you could add a number format to the cell's value:
cell_object_ref.NumberFormat = "0000"
which should display the number 12 as 0012.
Alternatively, you could add an apostrophe at the beginning of the cell's value:
cell_object_ref.value = " '0012 "
I haven't tried the latter in vba/script but should be ok.
Pat Read
Off the top of my head, you could add a number format to the cell's value:
cell_object_ref.NumberFormat = "0000"
which should display the number 12 as 0012.
Alternatively, you could add an apostrophe at the beginning of the cell's value:
cell_object_ref.value = " '0012 "
I haven't tried the latter in vba/script but should be ok.
Pat Read