There are tow choice the first one works if the value in texbox1 <> the value in the column A and the caption in lable1 = the vlaue in column B
the second must works if the textbox1= the value in column A and lable1 = the vlaue in column B

but the problem is the first choice work in both case .. how t ofix this problem

[VBA]
Dim rs As Range
'the first choice
With Sheets(1)
For Each rs In Sheets(1).Range("a1", .Range("a" & Rows.Count).End(xlUp))
If rs.Value <> TextBox1.Text And rs.Offset(0, 1).Value = Label1.Caption Then
MsgBox "No"
Exit Sub
End If
Next rs
End With
'the second choice
MsgBox "Yes"
[/VBA]