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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top