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

  • Thread starter Thread starter John Smith
  • Start date Start date
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.
 
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
 
Back
Top