All I can say is grrrrrrr about this one. All I want to do is check a textbox in a userform for alpha characters. If it does have alpha characters I want to reset the box and prompt to enter a number.
This is a bit of code that I was just messing around with to try and figure it out.
Basic piece of code but if I could ever figure the $#%@$% checking for alpha character thing it is actually going to be used in a much larger project. ****pulls hair out*****
This is a bit of code that I was just messing around with to try and figure it out.
Code:
Private Sub CommandButton1_Click()
Dim t1 As Integer
Dim t2 As Integer
If TextBox1 = "" Or TextBox1 < 1 Then
MsgBox "Please Enter numbers1"
Exit Sub
ElseIf TextBox2 = "" Or TextBox2 < 1 Then
MsgBox "Please enter numbers2"
Exit Sub
End If
t1 = TextBox1.Value
t2 = TextBox2.Value
Worksheets("Sheet1").Range("A20").Value = t1 + t2
End Sub
Basic piece of code but if I could ever figure the $#%@$% checking for alpha character thing it is actually going to be used in a much larger project. ****pulls hair out*****