Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Text Box lost its leading 0 - need help

The strangest thing happened ... for the longest time my macro worked
well. One textbox queries a lot number which starts with a 0.

The target field is formatted as text:

Range("Z2:Z3").NumberFormat = "@"

All of a sudden the box removes leading zeros... Cant figure out why
.... the code realting to this hasnt changed.

How can I force the box to be text and leave leadign zeros alone?

Matt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Text Box lost its leading 0 - need help

Problem corrected: Not sure how but I forced the leading zero in there
;)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Text Box lost its leading 0 - need help

In any event, you can use the text property of the range to display the
value as displayed

msgbox ActiveCell.Text

rather than

msgbox ActiveCell.Value

--
Regards,
Tom Ogilvy


"Matt" wrote in message
oups.com...
Problem corrected: Not sure how but I forced the leading zero in there
;)



Reply
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
Leading zeros lost in csv Liz C Excel Worksheet Functions 2 August 23rd 06 06:45 PM
text cells end page how split to next. Text lost! Elaine Excel Discussion (Misc queries) 1 August 28th 05 05:48 PM
Remove text leading zero in text string Cheryl B. Excel Worksheet Functions 5 May 29th 05 07:46 PM
Remove text leading zero in text string Peo Sjoblom Excel Worksheet Functions 0 May 27th 05 09:59 PM
numbers and text in Excel to read as text keeping the leading zer. Ralph Excel Discussion (Misc queries) 2 December 10th 04 07:05 PM


All times are GMT +1. The time now is 06:55 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"