View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GTVT06 GTVT06 is offline
external usenet poster
 
Posts: 141
Default Format Column to display leading zeros.

On Mar 22, 1:15*pm, Glenn Buchanan <Glenn
wrote:
Using an external program with a language very similar to VB I have a script
that uses CreateObject to create a new workbook and fill with data. All well
and good. I have one column that is filled mostly with numbers where I need
to see any leading zeros.
How would I format this column before filling it? Changing the format after
the data is entered results in missing leading zeros.
With xl
.ActiveSheet.Columns("F:F").NumberFormat = ?

Regards,
Glenn

The ZipCode format alows leading 0's Example:
With xl
.ActiveSheet.Columns("F:F").NumberFormat = "0000"