PC Review


Reply
Thread Tools Rate Thread

Close Internet connection

 
 
=?Utf-8?B?ZG9uYm93eWVy?=
Guest
Posts: n/a
 
      2nd Nov 2005
I have MS XL Home & MS Office circa 2003
In Excel I am using the following to open a specific web page via IE6 and it
works fine.
Dim webBk As Workbook
Set webBk = Workbooks.Open("http://www.somewebpage.com")

But what code can I then use to close the connection and IE6.

--
donwb
 
Reply With Quote
 
 
 
 
dysgraphia
Guest
Posts: n/a
 
      2nd Nov 2005
webBk.Close savechanges = False
Set webBk = Nothing

Your Workbooks.Open doesn't open the web/IE as such just.
If otherwise you want to close IE you can use IE.Quit, IE.Close,
Set IE = Nothing
which assumes you had earlier Set IE = Application("Internet Explorer")

donbowyer wrote:
> I have MS XL Home & MS Office circa 2003
> In Excel I am using the following to open a specific web page via IE6 and it
> works fine.
> Dim webBk As Workbook
> Set webBk = Workbooks.Open("http://www.somewebpage.com")
>
> But what code can I then use to close the connection and IE6.
>

 
Reply With Quote
 
=?Utf-8?B?ZG9uYm93eWVy?=
Guest
Posts: n/a
 
      3rd Nov 2005
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.
--
donwb


"dysgraphia" wrote:

> webBk.Close savechanges = False
> Set webBk = Nothing
>
> Your Workbooks.Open doesn't open the web/IE as such just.
> If otherwise you want to close IE you can use IE.Quit, IE.Close,
> Set IE = Nothing
> which assumes you had earlier Set IE = Application("Internet Explorer")
>
> donbowyer wrote:
> > I have MS XL Home & MS Office circa 2003
> > In Excel I am using the following to open a specific web page via IE6 and it
> > works fine.
> > Dim webBk As Workbook
> > Set webBk = Workbooks.Open("http://www.somewebpage.com")
> >
> > But what code can I then use to close the connection and IE6.
> >

>

 
Reply With Quote
 
dysgraphia
Guest
Posts: n/a
 
      3rd Nov 2005
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.

 
Reply With Quote
 
=?Utf-8?B?ZG9uYm93eWVy?=
Guest
Posts: n/a
 
      9th Nov 2005
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.

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
lose internet connection when open/close or snd/rcve windows mail =?Utf-8?B?TGVpc2U=?= Windows Vista Mail 1 17th Jul 2007 06:18 PM
So Close - Server Internet Connection =?Utf-8?B?Q2hyaXMgV2hpdGUgLSBTdGlybGluZw==?= Microsoft Windows 2000 Networking 3 19th Apr 2004 03:23 PM
Close Internet Connection =?Utf-8?B?TVN1dA==?= Windows XP Help 1 27th Jan 2004 10:29 PM
Exit Internet Explorer - Close dialup connection Jim J. Windows XP Internet Explorer 1 2nd Sep 2003 04:22 PM
Re: Internet Connection Sharing: "Generic Host Process... has encountered a problem and needs to close..." error when client connects Ken Wickes [MSFT] Windows XP Networking 2 31st Aug 2003 06:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:32 PM.