Terence
Dec 9th, 2000, 07:33 AM
I am writing a program which would create an instance of IE(version 5.51) to navigate to a site. The page I retrieve will automatically send data to this IE at a 10 seconds interval to refresh the screen. The problem was that I could not terminate this IE instance.
I create the instance of IE with the following statements:
Private WithEvents mobjIE As SHDocVw.InternetExplorer
Set mobjIE = CreateObject("InternetExplorer.Application")
then navigate to the site with :
mobjIE.Navigate strQAddr, 2
then retrieve the content of the page via :
Dim doc As HTMLDocument
Set doc = mobjIE.Document
then I tried to terminate the instance of IE using :
mobjIE.Stop
mobjIE.Quit
the program then executes the End statement.
But the IE instance is still there, and still receiving data from the site.
If the program starts up and executes again, another IE is created, taking up additional resource and very soon my machine is low in memory.
Could anyone tell me what I have done wrong ?
Help is much appreciated.
Terence
I create the instance of IE with the following statements:
Private WithEvents mobjIE As SHDocVw.InternetExplorer
Set mobjIE = CreateObject("InternetExplorer.Application")
then navigate to the site with :
mobjIE.Navigate strQAddr, 2
then retrieve the content of the page via :
Dim doc As HTMLDocument
Set doc = mobjIE.Document
then I tried to terminate the instance of IE using :
mobjIE.Stop
mobjIE.Quit
the program then executes the End statement.
But the IE instance is still there, and still receiving data from the site.
If the program starts up and executes again, another IE is created, taking up additional resource and very soon my machine is low in memory.
Could anyone tell me what I have done wrong ?
Help is much appreciated.
Terence