PDA

View Full Version : Problem with ComboBoxes (control toolbox ones)



percy4
09-30-2009, 12:20 AM
I am having some trobule with these two control toolbox type comboboxes.

As you can see the defined names created works fine for “forms type” comboboxes and Excels data validation.

The actual dropdown values change but when I choose “Opt1” it shows four values with a blank in the bottom and when I choose any of the other values the max rows visible is 5 even though I changed the listrow property from 0-15 nothing changes.

Am I missing something?

Thanks for your help!

BR
Percy

Bob Phillips
09-30-2009, 01:29 AM
Try this

percy4
09-30-2009, 02:04 AM
Try this

Sorry but it is still not working.... these changes made the values freak out. sometime when chosing op1 or 2 the values are displayed and in the bottom a few blanks and then duplicates of the values again.

Is this a common problem?

Thanks!

Aflatoon
09-30-2009, 07:26 AM
I would suggest you do not bind the control to the named range, but rather fill it in code:


Private Sub ComboBox1_Change()
If Me.ComboBox1.Value <> "" Then
With Me.ComboBox2
.ListIndex = -1
.List = Range("Array").Value
End With
Else
Me.ComboBox2.Clear
End If
End Sub


See attached version.

Bob Phillips
09-30-2009, 08:28 AM
Sorry but it is still not working.... these changes made the values freak out. sometime when chosing op1 or 2 the values are displayed and in the bottom a few blanks and then duplicates of the values again.


I cannot reproduce this problem. Can you walk me through the steps to reproduce it?