application.quit...


Posted by rm on February 01, 2002 4:54 PM

Hello,

I am using application.quit to close Excel when the workbook is closed by the user (only can close with custom cb button in workbook or with "x" button). The cb button and window close button, but does not work when you terminate the application with the application's close button (the "x" at the top)...when you try to do this, the workbook closes, but Excel does not terminate. How can it be corrected so that using the application close button will terminate Excel?

Thank you,
rm

p.s. thanks to Jack in U.K. for the tip about clearing memory--ran update of workbooks with sub (over 700 & took 3 hours to run!) and did not run out of memory...thanks a lot again!

Posted by Jack in the UK on February 02, 2002 10:48 AM

Hi rm--
Application.Quit works for me but request save changes... Tell me more as you hit the cammand button TOTAL excel close is what you want?

Do you want save chnges as well just as Excel shut down.. ?

Rdgs
Jack



Posted by rm on February 02, 2002 4:22 PM

Hi J.I.U.K. (and others),

I use like this...


application.quit
thisworkbook.close savechanges:=false


...this closes Excel, not just the workbook (which is what I want to do)--and of course, does not save changes to workbook, which is also what I want to do.

This is assigned to a cmdbutton on a custom toolbar in my "application" and works; this method also works if you click the "x" (close button) on the workbook window. The only time it does NOT work is when you click the "x" at the very top (to close Excel). If you do this, the workbook closes, but Excel remains open. Any ideas???

Thanks,
rm