Private Sub TextBox1_Change()
TextBox1.BackColor = IIf(Application.CountIf(Range("A2:A20"), TextBox1), &H80FF80, &HFF&)
End Sub
Private Sub TextBox1_Change()
If Application.CountIf([A2:A20], TextBox1) > 0 Then
TextBox1.BackColor = &H80FF80
Else
TextBox1.BackColor = &HFF&
End If
End Sub
Private Sub TextBox1_Change()
TextBox1.BackColor = IIf(Application.CountIf(Range("A2:A20"), TextBox1), &H80FF80, &HFF&)
End Sub