[VBA] Populating ComboBox via RowSource -- no scroll bar?

Zetor

New Member
Joined
Mar 31, 2005
Messages
2
'Eyall,

I'm trying to use two ComboBoxes for one piece of data to "refine" data entry, as it were. Basically, the user has to choose the county where the event took place in ComboBox1, and then choose the appropriate small area code (NUTS if any of you are familiar with EU conventions :p ) from ComboBox2. Something like this: (paraphrased)
Code:
Private Sub cobBalesetMegye_Change()
    Select Case cobBalesetMegye.Value
        Case "01"
            cobNUTS.RowSource = "Kódtáblák!BV2:BX2"
        Case "02"
            cobNUTS.RowSource = "Kódtáblák!BY2:CA302"
...
    End Select
End Sub
This does populate the second ComboBox correctly, but there appears to be no scroll bar present. I checked the attributes of cobNUTS, it's similar to the other ComboBoxes in the UserForm, and all of those get a scroll bar. With over 400 possible NUTS code choices in some counties, not having a scroll bar is a pain... is there any way to fix this? Or do I have to resort to adding the data manually with AddItem?


TIA,

-- Z.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Thanks, looks like it works now... though it looks like the problem was me forgetting to set the ListRows property, d'oh!


-- Z.
feeling like a doofus
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,007
Members
449,203
Latest member
Daymo66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top