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

Compare Textbox values

$
0
0
I have to textboxes that I want to compare so I can have a message box alert the user to incorrectly entered values.

I can't seem to get the compare to work.

textbox1 > textbox2

This is what I have:

Dim NTGvar, NTPvar As Variant

NTGvar = textbox1
NTPvar = textbox2

If NTGvar > NTPvar Then
MsgBox "Number of Gear teeth can not be less than teeth in Pinion", vbInformation + vbOKOnly, "Number of Teeth Error"

Thanks for the assist
David

Viewing all articles
Browse latest Browse all 688

Trending Articles



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