Results 1 to 1 of 1
2003-03-04, 16:46 #1
- Join Date
- Dec 2002
- Bruges, Belgium
- Thanked 2 Times in 2 Posts
How to close an internet connection? (2002 (XP))
I recently performed a webquery from vba. The coding went somehow like this:
Dim Wkb as WorkBook
Dim QT as QueryTable
Set Wkb = Workbooks.Add
Set QT = .QueryTables.Add(Connection:= "URL;http://webaddress", Destination:= .Range("A1"))
.WebSelectionType = xlSpecifiedTables
.WebTables = "2"
QT.Refresh BackgroundQuery:= False
The program performed up to my expectations: it did open an internet connection, asked for a password to get through and downloaded the
requested table in the worksheet.
However, the connection remained open after the download. Even after the program ended!
Obvious question: How can I (or the program's user if he/she desires to do so) close that connection?
I couldn't find any method within excel rich vocabulary to do so. Is the blame on me?