Hi All,
I have searched through this and other forums about dependent combo boxes and have found the excel way of linking them, not the vba way though.
Here is my case. I have the following piece of code which populates 3 combo boxes from a matrix sheet with the necessary information:
[pre]
[/pre]
i is the numeric value of the columns with the information I want. As it is right now ComboBoxIndicator1 has all the indicators on the list. How can I make the indicators that appear in comboBoxIndicator1 vary according to what the user chose on ComboBoxIndicCategory?
Thanks in advance for your help. I have tried many ways but without success.
I have searched through this and other forums about dependent combo boxes and have found the excel way of linking them, not the vba way though.
Here is my case. I have the following piece of code which populates 3 combo boxes from a matrix sheet with the necessary information:
[pre]
Code:
With WSMatrix
For i = 5 To 208
If .Cells(7, i).Value <> "" Then
Categories.Add .Cells(7, i).Value
End If
Next i
Set Categories = SortData(Categories)
n = Categories.Count
For i = 1 To n
Me.ComboBoxFilterCategory.AddItem Categories(i)
Next i
For i = 163 To 195
If .Cells(2, i).Value <> "" Then
IndicCategories.Add .Cells(2, i).Value
End If
Next i
Set IndicCategories = SortData(IndicCategories)
n = IndicCategories.Count
For i = 1 To n
Me.ComboBoxIndicCategory.AddItem IndicCategories(i)
Next i
For i = 163 To 195
If .Cells(7, i).Value <> "" Then
Indicators.Add .Cells(7, i).Value
End If
Next i
Set Indicators = SortData(Indicators)
n = Indicators.Count
For i = 1 To n
Me.ComboBoxIndicator1.AddItem Indicators(i)
Next i
Me.ComboBoxIndicator1.Text = Range("D3").Value
End With
i is the numeric value of the columns with the information I want. As it is right now ComboBoxIndicator1 has all the indicators on the list. How can I make the indicators that appear in comboBoxIndicator1 vary according to what the user chose on ComboBoxIndicCategory?
Thanks in advance for your help. I have tried many ways but without success.