Thread: combo box
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
ynissel
 
Posts: n/a
Default combo box

Thanks - perfect !
Stupid mistake and screwed me for half a day !!

"Elkar" wrote:

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


"ynissel" wrote:

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