Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Filtered Data for ComboBox
I am pretty green when it comes to VBA, actually very green. But what
am looking for is some idea of what some code would look like for th following: Say I have 6 options to choose from in the first ComboBox, however eac of those options have 10 subsets. What I am looking for is code tha will adjust the second ComboBox to show the correct subsets based o the first selected data in the first ComboBox. Anything would help, if my description is too confusing please tell me Thanks to anyone who takes the time to help me -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Filtered Data for ComboBox
I put a couple of comboboxes from the control toolbox toolbar on a worksheet.
I put the listfillrange for the first combobox on a different sheet. Then in the code for that first combobox, I had this: Option Explicit Private Sub ComboBox1_Change() Dim myCell As Range With Me.ComboBox2 .Clear For Each myCell In Application.Range(Me.ComboBox1.ListFillRange) If myCell.Text = Me.ComboBox1.Value Then .AddItem myCell.Offset(0, 1).Value End If Next myCell End With End Sub "cdos <" wrote: I am pretty green when it comes to VBA, actually very green. But what I am looking for is some idea of what some code would look like for the following: Say I have 6 options to choose from in the first ComboBox, however each of those options have 10 subsets. What I am looking for is code that will adjust the second ComboBox to show the correct subsets based on the first selected data in the first ComboBox. Anything would help, if my description is too confusing please tell me. Thanks to anyone who takes the time to help me. --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return filtered values into report worksheet based on filtered valueon the data worksheet | Excel Worksheet Functions | |||
MS2007 - deleting filtered data, deletes non-visible data too | Excel Discussion (Misc queries) | |||
Help to sort out filtered data from the data contained in another sheet of the same workbook | Excel Worksheet Functions | |||
ComboBox data | Excel Worksheet Functions | |||
ComboBox filtered on partial match? | Excel Programming |