Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Once you build the query, then yes, you just use the refresh property after
you change the string. The query is automatically dropped.. What you are talking in the names collection are not connections. -- Regards, Tom Ogilvy "Johnslg" wrote in message ... hmmm....I'm calling QueryTable inside a For loop in a single VB macro. The loop will run for as many cells of data the user adds to a column in the spread sheet. I'm doing a Activesheet.QueryTable.Add..... I'm not sure how to "refresh". Can I do ...QueryTable.Refresh.... instead of Add? Is there no "drop connection" command or method? THANKS! "Tom Ogilvy" wrote: http://nickhodge.co.uk/gui/datamenu/...taexamples.htm http://www.dicks-clicks.com/excel/Ex...htm#Parameters once the query is built, change the parameter and refresh the query (don't rebuild it). Make the the Backgroundquery property is set to false. -- Regards, Tom Ogilvy "Johnslg" wrote: I have a sheet that lets the user enter a chart of accounts in a column & then a macro runs against each account (using QueryTable), hits an SQL database, and returns data. My problem is that it adds a new connection each time the mcro runs. I just deleted about 400 connections. Is there a way to reuse the same connection (it's all going against the same server/database) or is there a way to automatically delete connetions? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Inhibit use of the function "Connections" on Excel 2007 | Setting up and Configuration of Excel | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
How to avoid "Data connections have been disabled" | Excel Discussion (Misc queries) | |||
"Data Connections have been disabled" If no macros, Why? | Excel Discussion (Misc queries) | |||
MS Query "Connections" | Excel Programming |