ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add ability to excel to create dynamic drop-down(CTRL+L) lists us. (https://www.excelbanter.com/excel-programming/316243-add-ability-excel-create-dynamic-drop-down-ctrl-l-lists-us.html)

RobC

Add ability to excel to create dynamic drop-down(CTRL+L) lists us.
 
I tried building this but I don't think it's possible. It would be nice if a
web query could be dumped into excel then a drop-down list is populated by
that data. I THINK it could be done a very round about way, but it would be a
hack at best.

sebastienm

Add ability to excel to create dynamic drop-down(CTRL+L) lists us.
 
Hi,
By dropdown, if you mean ComboBox, it should be pretty easy, and it doesn't
require any code:
1. Web Query
- In a sheet , say ShQuery, create your webquery.
- The resulting range is given a sheet level name, say External_Data1.
- Now hide the sheet in visual basic editor through the Properties Window
of that sheet by setting its Visible property to xlSheetVEryHidden.
- set properties for this query as you wish. Eg: refresh on book open or
every x minutes. Don't display headers....
2. Combobox
- select the other sheet, where you want the combobox to appear.
- Display the Control Toolbox toolbar (menu View Toolbars Control
Toolbox toolbar).
- add a combobox to the sheet
- select the combobox and click the Properties icon from the Control
Toolbox toolbar: the Property Window for the combo apears.
- set the ListFillRange property to source data ie the named range:
ShQuery!External_Data1

Done!
Now, everytime the query refreshes, the combo contents is automatically
updated by excel.

Regards,
Sebastien

"RobC" wrote:

I tried building this but I don't think it's possible. It would be nice if a
web query could be dumped into excel then a drop-down list is populated by
that data. I THINK it could be done a very round about way, but it would be a
hack at best.



All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com