LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formatting Number as Text

activeCell.NumberFormat = "@"

formats the cell as Text

--
Regards,
Tom Ogilvy

"swaterhouse" wrote in message
...
I am populating cells in an excel spreadsheet from VB. I use the

NumberFormat property on the Columns collection to format numbers and dates
but I need to specify that a column is text. I have a customer with an
expense code that sometimes starts with leading 0's (i.e. 00125330). Is
there an expression I can use to force it to format as text on the
NumberFormat property or a different way entirly? I tried using "Text"
because I saw examples of using "Gemeral" to let it autoformat, but that
didn't work. I have also tried putting in a leading space but that didn't
work either.

Thanks
--
Scott



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Formatting Number as Text klafert Excel Worksheet Functions 5 January 6th 10 05:38 PM
Formatting from Number to Text FredL Excel Discussion (Misc queries) 4 December 8th 06 02:52 PM
Formatting Number as Text Frank Stone Excel Programming 0 July 27th 04 07:02 PM
Formatting Number as Text Frank Stone Excel Programming 0 July 27th 04 07:02 PM
Formatting Number as Text Frank Stone Excel Programming 0 July 27th 04 06:58 PM


All times are GMT +1. The time now is 10:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"