Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Option Explicit Sub testme() Dim myRng As Range With Worksheets("Sheet1") '<-- where the data is Set myRng = .Range("A1", .Cells(.Rows.Count, "A").End(xlUp)) End With 'If it's a dropdown from the Forms toolbar: With Worksheets("Sheet2") '<-- where the controls are .DropDowns("Drop down 1").ListFillRange = myRng.Address(external:=True) End With 'If it's a combobox from the control toolbox toolbar With Worksheets("sheet2") .OLEObjects("combobox1").ListFillRange = myRng.Address(external:=True) End With End Sub Walmir wrote: ActiveWorkbook.Worksheets("model").Shapes("selecto r").DropDown = Range("config!$list") I would like to use in vba a command that could define dinamically the data of a dropdown box, something like what is above (but that works!). Anyone can help me? -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable and enable dropdown combobox(Form Control) | Excel Discussion (Misc queries) | |||
Disable dropdown list (Combo box -"Form control") | Excel Worksheet Functions | |||
Loss of dropdown control when publishing | Excel Worksheet Functions | |||
populating a dropdown based on choice from a previous dropdown | Excel Programming | |||
Dropdown control as multiline | Excel Programming |