View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default 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.