• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Match Multiple TextBox Value with Range value

delta

Member
my userform contains 3 textBox and worksheet "sheet1" range A2 : A6
TextBox 1
TextBox 2
TextBox 3


i like if sheet1 range A2: A6 match value with any of the 3 TextBox value than
those TextBox Back color is "Red" ( only match value of TextBox)
how it is possible with vba code
 
Hi,
This?
Code:
Private Sub TextBox1_AfterUpdate()
Dim rng As Range, cell As Range
Set rng = Range("A2:A6")
For Each cell In rng
    If TextBox1.Value = cell.Value And TextBox1.Value <> "" Then TextBox1.BackColor = vbRed
    Next cell
End Sub
 
my problem is
when user cllick a command button than check the range A2:A6 to match value in all Three TextBox and match the value those TextBox back color is "Red".

how to check all three TextBox Value with Range A2:A6 value.
 
Back
Top