Close Internet connection
Thanks for your reply. Apologies for not coming back sooner but have been
trying to fix the issue myself, without success.
What I am trying to do (and all this is programmatically), is to download,
copy, import or any other way get the contents of a specific web page onto an
Excel Worksheet.
I have tried:-
Dim webBk As Workbook
Set webBk=Workbooks.Open("http://www.somewebpage.com)
But I get a runtime error message saying MS Access cannot access the file
"http://www.somewebpage.com" because either it doesn't exist or is being used
by another program €“ neither of which is true.
So then I have tried:-
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
.Navigate "https://www.somewebpage.com "
End With
This brings up the required web page, but I don't know how then to transfer
it to Excel.
Any suggestions would be most welcome.
--
donwb
"dysgraphia" wrote:
Set webBk = Nothing just frees up the variable from memory.
If you had earlier in your code opened IE then IE.Quit
and Set IE = Nothing should be OK.
It would help to show the relevant code you are trying?...
are you programmatically opening IE?
donbowyer wrote:
Many thanks for the reply. I appreciate my code doesn't actually open the
web/IE. It does however achieve what I want to do, but unfortunately whilst
the first part of your suggestion does close the Workbook OK the second part
(Set webBk = Nothing) doesn't seem to close the connection??
Perhaps I'm missing something here.
|