application quit problem

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a module that opens an itrnaet page and then is suppose to close
excel down without saving changes. The following code closes the workbook
but does not close the excel application, can anyone advise how I can get
excel to terminate ?

If uid <> 0 Then
Set ie = CreateObject("Internetexplorer.Application")
ie.Visible = True
ie.navigate "inside.mysite.com\qbrowse\lizard\expenses.asp?uid=" &
uid

End If
Application.DisplayAlerts = False
Application.Quit

Thanks in anticipation

John
 
Generally this is the result of not releasing a reference. Also, it is
unclear what "Application" refers to in your code - but if it is a reference
to the excel application, you never release it in the code shown.
 
After looking closer (i had a misperception about what you were doing),
perhaps all you need to do is add

set ie = nothing

at the end.
 
Make sure that all objects are cleared, such as

Set ie = Nothing

Also make sure that all objects are properly qualified, and as a last
resort, remove any With ... End With blocks as these have been known to
cause a problem.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Back
Top