LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Lyndon
 
Posts: n/a
Default Adding database data to a combo box...

Hi guys,


I have a working databse query thar returns a list of names. I want to

put this into a combo box. Currently I am inserting the database data
into a range on my spreadsheet (A1) and it uses as many rows as there
are names. In my combo box properties I can specify the ListFillRange
as A1:A5 or whatever and this works okay, but the thing is, as names
are added to the database, I want the range A1:A5 to update
dynamically.


Q1. Can I send the QueryTable data directly to the combo box
ListFillRange...


With ActiveSheet.QueryTables.Add(Co=ADnnection:=3Dconns tring,
Destination:=3DComboBox1.ListFil=ADlRange etc.


Q2. If I can't do that, is there an Excel function that can tell me
the position of the last record in the range... A10 or A30 or whatever,

so I can use VB code to reset the range after the query returns...


.Refresh
End With


ComboBox1.ListFillRange("A1:" & something here...


Thanks guys.=20


Cheers,=20
Lyndon.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
data val. and combo box joe smith Excel Discussion (Misc queries) 1 March 24th 05 06:13 PM
Adding more source data to existing scatter plot Tom Charts and Charting in Excel 1 March 21st 05 10:03 PM
excel to get data from an access database confused Excel Discussion (Misc queries) 1 February 18th 05 06:29 PM
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 05:15 PM


All times are GMT +1. The time now is 03:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"