Hi All,
How do yuo stop Letters being entered into a text box. I know the variable used to stip Numbers- but how about Characters?????
I used this for Numbers : -
ThanksCode:Dim text1 As Integer Dim text2 As Integer Dim text3 As Integer text1 = InStr(1, txtName.Text, "") text2 = InStr(1, txtAge.Text, "") text3 = InStr(1, txtemail.Text, "@") If text1 = 0 Then MsgBox "Please Enter Your Name" Else If text2 = 0 Then MsgBox "Please Enter your Age" Else If text3 = 0 Then MsgBox "Please Enter a Valid Email Address" End If End If End If If txtName.Text <> vbNullString And txtAge.Text <> vbNullString And txtemail.Text <> vbNullString Then Call Check_details Unload frmUser End If End Sub




Reply With Quote