I usually work in different applications, usually in VB6 actually, and if I want to check if an input field is numeric, I usually use the IsNumeric Function. However, in an excel user form I made the code:
produces a Type Mis-Match error if one field is alpha. The Else statement after all of this is a simple message box instructing a re-inspection of the fields. This has worked many times in my previous VB projects. So what am I missing that I need to do in excel?
Thanks in advance for any assistance. . . .
<== Some people say they are afraid of heights. With me its table widths. ==>
Code:
If IsNumeric(Me.TextBox1.Value And Me.TextBox2.Value _
And Me.TextBox3.Value And Me.TextBox4.Value And Me.TextBox5.Value _
And Me.TextBox6.Value And Me.TextBox7.Value And Me.TextBox8.Value _
And Me.TextBox9.Value And Me.TextBox10.Value And Me.TextBox11.Value _
And Me.TextBox12.Value And Me.TextBox13.Value And Me.TextBox14.Value _
) Then
produces a Type Mis-Match error if one field is alpha. The Else statement after all of this is a simple message box instructing a re-inspection of the fields. This has worked many times in my previous VB projects. So what am I missing that I need to do in excel?
Thanks in advance for any assistance. . . .
<== Some people say they are afraid of heights. With me its table widths. ==>