Compare strings between 2 TextBoxes

  • Thread starter Thread starter gabriel
  • Start date Start date
G

gabriel

I am creating a password form.
I have 2 TextBoxes that need to be compared.
I currently have the following:
if Not tb1=tb2 then ...
The problem is with case sensitivity.
Currently, "John" will equal "john"
How do I check that "John" is not equal to "john"

Thanks
 
gabriel said:
I am creating a password form.
I have 2 TextBoxes that need to be compared.
I currently have the following:
if Not tb1=tb2 then ...
The problem is with case sensitivity.
Currently, "John" will equal "john"
How do I check that "John" is not equal to "john"

Use the StrComp() function with the vbBinaryCompare option.
 
Back
Top