![]() |
workbook close macro
Hi,
excuse my naivety but I'm a bit of a novice :) Very simply I want a macro to close my excel application, but I can only get it to close the open workbook, here is what I have... Sub before_close() Application.ActiveWorkbook.Save Workbooks("Book1").Close End Sub can U help? than ks |
workbook close macro
Try
Application.Quit -- HTH RP (remove nothere from the email address if mailing direct) "Anthony" wrote in message ... Hi, excuse my naivety but I'm a bit of a novice :) Very simply I want a macro to close my excel application, but I can only get it to close the open workbook, here is what I have... Sub before_close() Application.ActiveWorkbook.Save Workbooks("Book1").Close End Sub can U help? than ks |
workbook close macro
Hello Anthony, Add this to your code... APPLICATION.QUIT This will close and exit Excel. Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=495387 |
workbook close macro
Thanks Bob!
"Bob Phillips" wrote: Try Application.Quit -- HTH RP (remove nothere from the email address if mailing direct) "Anthony" wrote in message ... Hi, excuse my naivety but I'm a bit of a novice :) Very simply I want a macro to close my excel application, but I can only get it to close the open workbook, here is what I have... Sub before_close() Application.ActiveWorkbook.Save Workbooks("Book1").Close End Sub can U help? than ks |
All times are GMT +1. The time now is 03:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com