Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may add this to your macro to delete the names before/after your fetch.
For Each Name In Sheets("Data").Names Name.Delete Next Name ======== or use a refresh like this with variable interspersed. With sheets("sheet1").QueryTables(1) .Connection = _ "URL;http://www.speedtv.com/schedule/index.php?m=&do=&week=" & X & "&ts=&wholeMonth=&subcat=&program=&usecal=yes&star tMonday=1" .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingAll .WebTables = "1,""speedListing""" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With ======= or Sub GP() With Sheets("sheet1").QueryTables(1) .Connection = _ "URL;http://postcalc.usps.gov/MailServices.aspx?Country=Domestic&M=" & [mytype] & "&P=0&O=" & [myounces] & "&OZ=78734&DZ=78731" .WebSelectionType = xlEntirePage .WebFormatting = xlWebFormattingAll .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With -- Don Guillett SalesAid Software "Johnslg" wrote in message ... 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) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |