How to tell textbox to treat number as number, not text, and notshow zero

J

John Smith

If I leave textbox.value blank, textbox treat the number I entered
as text. If I set textbox.value to zero, textbox treats number as
number but it displays a big fat 0.

How do I get textbox to treat number as number and not display
zero but blank instead? Thanks.
 
N

NickHK

John,
A textbox only deal with text :

With TextBox1
MsgBox TypeName(.Value) & " : " & TypeName(.Text)
End With

You have to coerce (CLng, CDbl, etc) the value when you use it

If not want a zero, don't put a zero in the textbox.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top