Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

VBA Value comparison error

$
0
0
I do not understand why this script does not work
I have tried several scripts, so I must be missing something

Private Sub btn_OK_Click() 'button on form to accept the value entered
Dim MyResult, Var1, Var2

Var1 = TextBox1.value ' Textbox on form

Var2 = txtHiLimit.value 'Textbox on form

MyResult = (Var1 <= Var2) see if value in TextBox1 is less than or equalt to value in txtHiLimit Textbox

seems to fail MyResult

If MyResult Then
TheTextHiLo = TextBox1.Text
frmKeypadHiLo.Hide
End If

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>