View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Userform Validation

thanx
-----Original Message-----
On Sat, 13 Dec 2003 14:11:35 -0800, Todd Huttenstine

wrote:

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

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