You are viewing this page out of context. To see it in the context it is intended please click here.
About This Page
Reply posted by Pat Read on Tue 26 Feb 2002 in response to Keeping the boss happy
Re: Set column propertie values in Excel
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