Userform Validation

  • Thread starter Thread starter Todd Huttenstine
  • Start date Start date
T

Todd Huttenstine

I have TextBox1,TextBox2, and TextBox3.

What is the code that will throw up a message box error
saying "cannot continue" if textbox1 and textbox2 do NOT
contain a number?

Todd Huttenstine
 
I have TextBox1,TextBox2, and TextBox3.

What is the code that will throw up a message box error
saying "cannot continue" if textbox1 and textbox2 do NOT
contain a number?

Todd Huttenstine

Something like this, perhaps?

Private Sub TextBox1_Change()
If Not IsNumeric(TextBox1.Text) Then
MsgBox "Cannot continue"
Exit Sub
End If
'...
End Sub
 
thanx
-----Original Message-----
Something like this, perhaps?

Private Sub TextBox1_Change()
If Not IsNumeric(TextBox1.Text) Then
MsgBox "Cannot continue"
Exit Sub
End If
'...
End Sub

--
auric "underscore" "underscore" "at" hotmail "dot" com
*****
To be or not to be. That is the result of 2b.
.
 
Back
Top