Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a combobox from which, when the user selects an item, I want it to
find the data within a range, and use it to populate a ListBox. For the life of me, I can't seem to figure it out. Any thoughts would be appreciated as this is my first attempt at using Excel VBA. The code I have so far is: (there is more than one case statement, but one should suffice for pointers.) Private Sub ComboBox1_click() Dim refrange As Range Select Case ComboBox1.Value Case "GSOP_286" Set refrange = Sheets("Data").Range("A3:A20").Value.Select For Each c In refrange ListBox1.AddItem c.Value Next End Select End Sub Thanks, -- Brian McCaffery |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
End Select without Select Case, Block If without End If errors | Excel Programming | |||
Case Select | Excel Programming | |||
Need help on Select Case | Excel Worksheet Functions |