View Single Post
  #2   Report Post  
Oblik
 
Posts: n/a
Default

Hi ynissel

Private Sub ComboBox1_GotFocus()
If Range("d1").Value = "a" Then
ComboBox1.ListFillRange = "a1:a5"
Else: ComboBox1.ListFillRange = "a1:a10"
End If
End Sub

pls take note of the first line - its about _gotfocus, and not _click




"ynissel" wrote:

I have a combo box whose list fill range is linked to a specific range. My
issue is -that based on some other criteria - the list should be 5 or 10
numbers. How can I get the combobox to understand that this should be
dynamic to the other variable ?

ie - if program = A then the drop down list should be 1,2,3,4,5 {actually
cells a1..a5} else the list should be 1,2,3,4,5,6,7,8,9,10 {cells a1..a10}?

Thanks,
yosef