Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Experts! i have question on how can check the value from another textbox to another.

this is my vb form:
http://www.photoshop.com/users/akosibogart/albums/a9cad965db544867983c83e9fdac8b2d/view#026c9a9ac51f46a38e8bb04fc1735d39[^]

my code:
http://www.photoshop.com/users/akosibogart/albums/a9cad965db544867983c83e9fdac8b2d/view#9efc1ec900294ea9b5bbb50ffa9d4b4d[^]

Problem:
as u can see in the picture. " yEs" is wrong because letter "E" is on capital letter.. i want to make it check as long as the user type the right answer. plss help..
Posted
Updated 29-Jan-13 23:53pm
v3

Hi,

You can keep your two textbox values in two different variables, and then use the following code:

VB
string1 = "Alaska"
string2 = "California"

result = StrComp(string1,string2,vbTextCompare)

' result = 0 if the strings are identical (case-insensitive)
' result = -1 if string1 is lexicographically less than string2
' result = 1 if string1 is lexicographically greater than string2


Thanks
 
Share this answer
 
Comments
akosisugar 30-Jan-13 5:57am    
sir my question and answer are taken from the database.in which part of my code should i put your code? string1,string2 and result "are not diclare..huhuu" help
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900