I'm trying to select the correct name in a userform combo box. Below i've captured the engineers name in a variable from a separate worksheet, now i want to force the combo box to select the matching name, i can't seem to get this to work any suggestions
Also any suggestions to eliminate all the repeatative if statements
Thanks
If myVar5 = "Bob" Then
frmPlanning.cboEngineer.List = (.ListIndex = 0)
End If
If myVar5 = "Fred" Then
frmPlanning.cboEngineer.List = (.ListIndex = 1)
End If
If myVar5 = "Larry" Then
frmPlanning.cboEngineer.List = (.ListIndex = 2)
End If
If myVar5 = "Steve" Then
frmPlanning.cboEngineer.List = (.ListIndex = 3)
End If
Bookmarks