Hello folks:
Here is what I am trying to do. If a name is entered in cboRepName combo box, I want to check if the name matches the list of names in the named range "Names" found in sheet repInformation. If the name is not found, then perform tasks.
Here is what I have so far, of course is not working, but I think I am close.
Here is what I am trying to do. If a name is entered in cboRepName combo box, I want to check if the name matches the list of names in the named range "Names" found in sheet repInformation. If the name is not found, then perform tasks.
Here is what I have so far, of course is not working, but I think I am close.
Code:
Private Sub cboRepName_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim repName As String
Dim nRange As Range
Set WS = Worksheets("repInformation")
Set nRange = WS.Range("Names")
repName = Me.cboRepName.Value
If repName <> nRange Then
Me.lblLocation.Enabled = True
Me.cboRepName.Enabled = True
End If
End Sub