Hi experts out there...I am at a complete loss here! I've spent HOURS trying multiple things to get this BASIC code to work and it still won't work.
I created a user form with 2 text boxes (TextBox1 and TextBox2)
This code IS NOT WORKING for me:
If Me.TextBox1.Value > Me.TextBox2.Value Then
MsgBox "Box 1 is greater than Box 2"
Else
MsgBox "Box 1 is less than Box 2"
End If
It is saying 50 (TextBox1) is greater than 100 (TextBox2)
I've tried using Format(Me.TextBox1.Value, "0") to make sure the values are registered as numbers. All other error checking works using my form element values, including numerical ones.
Please help! I've wasted so much time on this!
Thank you in advance!
I created a user form with 2 text boxes (TextBox1 and TextBox2)
This code IS NOT WORKING for me:
If Me.TextBox1.Value > Me.TextBox2.Value Then
MsgBox "Box 1 is greater than Box 2"
Else
MsgBox "Box 1 is less than Box 2"
End If
It is saying 50 (TextBox1) is greater than 100 (TextBox2)
I've tried using Format(Me.TextBox1.Value, "0") to make sure the values are registered as numbers. All other error checking works using my form element values, including numerical ones.
Please help! I've wasted so much time on this!
Thank you in advance!