im creating a simple calculator and i dont know how to disable letter in the textbox.. can someone help me please...newbie here....BTW im using VB6...
masterfact18 0 Light Poster
Recommended Answers
Jump to PostvbBack is string value
try Asc(vbBack)
Jump to PostThere are 2 ways to do this -
When your textbox looses focus, trap the error...
If Not IsNumeric(Text1.Text) Then
MsgBox "Numeric input only!", vbCritical, "Invalid Input"
Text1.Text = ""
End If
OR, you can just delete the letter that was typed so it only accepts numbers...
All 7 Replies
rishif2 57 Posting Whiz in Training
masterfact18 0 Light Poster
TnTinMN 418 Practically a Master Poster
rishif2 57 Posting Whiz in Training
AndreRet 526 Senior Poster
masterfact18 0 Light Poster
AndreRet 526 Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.