steveroberts
Programmer
Is it possible to have a multi column dropdown control in a custom toobar in Excel?
At the moment all I can fill it with is a single column of data by using the additem method.
Here's an excerpt from the code where ControlArray() returns an array based on the the control.
Set DdwnAnalysisType = CommandBars(AppName).Controls.Add(Type:=msoControlDropdown)
With DdwnAnalysisType
.Tag = "DdwnAnalysisType"
.Caption = "Item Group"
End With
ctrlValues = ControlArray(DdwnAnalysisType.Tag)
For iArrayRow = LBound(ctrlValues, 1) To UBound(ctrlValues, 1)
DdwnAnalysisType.AddItem (ctrlValues(iArrayRow, 2))
Next
Many thanks.
At the moment all I can fill it with is a single column of data by using the additem method.
Here's an excerpt from the code where ControlArray() returns an array based on the the control.
Set DdwnAnalysisType = CommandBars(AppName).Controls.Add(Type:=msoControlDropdown)
With DdwnAnalysisType
.Tag = "DdwnAnalysisType"
.Caption = "Item Group"
End With
ctrlValues = ControlArray(DdwnAnalysisType.Tag)
For iArrayRow = LBound(ctrlValues, 1) To UBound(ctrlValues, 1)
DdwnAnalysisType.AddItem (ctrlValues(iArrayRow, 2))
Next
Many thanks.