Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling excel.application.quit when opened in IE reopens the WB?

Status
Not open for further replies.

jc717

Programmer
Aug 1, 2001
13
US
This is really annoying me..., can anyone help?

I'm using an Excel workbook to act as a startup app for a PowerPoint presentation.
I need to load a couple of addins for the PowerPoint when it starts.

The users launch the Excel file by clicking on a link on our intranet.

In the workbook_open event the Excel file creates a Powerpoint application, loads the addins, opens the PowerPoint presentation, and all is well.. except for 1 thing.

Once this is all done, I call the application.quit method on the excel app, and rather than just quitting, the app gets restarted and the 'workbook_open' code runs again. The second time through it quits for good.

The annoying part of this is that users have to click twice on the 'enable macros' button.

This only happens if the Excel WB is opened in Internet Explorer. If it's opened in Excel, it works as designed.
Changing the users preferences to not have IE open the workbook is not an option due to company policy.

Does anyone know why the workbook_open event is firing again after the application.quit method is called?

Thank you for any insight or help with this matter.

JC

 
Have you tried this ?
ActiveWorkbook.Application.Quit

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top