What is the command to verify the field for text box in VB6? If the text box only can accept characters, once the user key in numbers, it will prompt out a error msg. Anyone can show me the command?
The command below is only allow number to be key in.
Private Sub txtname_KeyPress(KeyAscii As Integer)
If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = 46 Or KeyAscii = vbKeyBack Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub
What is the command to verify only characyers can be key in into textbox rather than number?
This post has been edited by jackyap84: Jan 21 2006, 02:42 PM
Verification Command For VB6, Verification Issue
Jan 21 2006, 02:24 PM, updated 20y ago
Quote
0.0113sec
1.31
6 queries
GZIP Disabled