combo box

Y

ynissel

I wrote an If statement to drive the list fill range of a combo box. It
worked till I added the second if now my result is alwats "ratelookup".
Can anyone figure out what I messed up on the syntax ?
Thanks,
Yosef


Private Sub ComboBox3_GotFocus()

If Range("b2").Value = "Alt A Second" Then

ComboBox3.ListFillRange = "ratelookups"

If Range("b2").Value = "Alt A+ Second" Then

ComboBox3.ListFillRange = "ratelookup2"

Else: ComboBox3.ListFillRange = "ratelookup"

End If

End If

End Sub
 
E

Elkar

Try adding an "ELSE:" before the second IF statement, like this:

ComboBox3.ListFillRange = "ratelookups"
Else:
If Range("b2").Value = "Alt A+ Second" Then

HTH,
Elkar
 
Top