View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Dynamic Combobox

Put this into the sheet module that has you
combobox in them
Private Sub ComboBox1_Change()
Dim c As Variant
ComboBox2.Clear
For i = 1 To 10
Set c = Range("A" & i)
ComboBox2.Value = c
ComboBox2.AddItem (c)
Next
End Sub

"Dennis" wrote:

I have been searching hours for a solution and haven't had any luck finding a
solution to the problem the follows. At first, this seemed a simple task.

Simple story: I have a combobox that is prepopulated and I want a second
combobox to react in drill-down fashion to the change event of the first.

Simple, Right?

The combobox is an in-sheet combobox (i.e., not on a user form and not
created dynamically at run-time) that will be visible 100% of the time. When
the first value changed event occurs - I want to remove all of any previously
loaded data in the second combobox and re-popluate the list from a different
data source (that may be in or outside of the workbook). I can access windows
forms objects if on a userform by name - but, how do I access the object if
it's "in-sheet"?

Anyway, I guess the need here is: how do I access the properties of windows
form control in-sheet and not in a userform.

Any help would be greatly appreciated.