Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How it to write in procedure?

Status
Not open for further replies.

miho1

Technical User
Oct 22, 2002
78
BG
In procedure Private Sub Text1_Change () I want to specify:

If Text1. Text contains Numeric

And

If Text1. Text does not contain Numeric

How it to write?

Miho
 
Look up the "IsNumeric" function in VB HELP. Note however that "IsNumeric" returns TRUE only if the string contains only the digits 0-9. Things like "123.45", "123,456" or "-55" are not considered to be numeric.
 
Very much thank.
I shall try.

Miho
 
Also consider

if Val(text1.text) <> 0 then
'a number exists

else
'either not a number, or user entered "0"
endif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top