VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Checking if the letter you typed in a textbox is the same as the letter from the other textbox.

by roel (1 Submission)
Category: String Manipulation
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Mon 18th March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Checking if the letter you typed in a textbox is the same as the letter from the other textbox.

API Declarations


'''Name them txt1 and txt2
'''The txt1 must have a 'defualt text'
'''If you don't know how to put a 'default text', just put any word on its Text
'''Property.
'''For professional programmers, I'm sorry if i have specified some of the steps, i'm just helping those first timers ok. Comments on this? check me out here: "[email protected]"

Rate Checking if the letter you typed in a textbox is the same as the letter from the other textbox.



'''Just like this Private sub txt2_Change()

Dim strLetter as String
Dim lenLetter as Integer

lenletter = Len(txt2.Text)
strLetter = Right$(Left(txt1.Text, lenletter), 1)

        If strLetter <> Right$(txt2.Text, 1) Then
              
               Beep 
               Msgbox "Error Typing..."
           
        End IF


Download this snippet    Add to My Saved Code

Checking if the letter you typed in a textbox is the same as the letter from the other textbox. Comments

No comments have been posted about Checking if the letter you typed in a textbox is the same as the letter from the other textbox.. Why not be the first to post a comment about Checking if the letter you typed in a textbox is the same as the letter from the other textbox..

Post your comment

Subject:
Message:
0/1000 characters