View Full Version : Exit Excel Macro
SimonMag
04-12-2007, 01:47 AM
Hi,
I am trying to find a macro that will allow me to exit Excel and prompt to save the current workbook and then exit Excel. I want to also assign this to a button.
Thanks
Simon.
jammer6_9
04-12-2007, 02:00 AM
Make a commandbutton and if symptomps persist ask the VBAX expert, :rotlaugh:
Private Sub CommandButton1_Click()
activeworkbook.close(Yes)
application.quit
End sub
mdmackillop
04-12-2007, 05:16 AM
Hi Jammer
Our code posting is a little different from other sites. Select your code and click the VBA button to format it as shown.
Regards
MD
jammer6_9
04-12-2007, 06:13 AM
:thumb
Hi Jammer
Our code posting is a little different from other sites. Select your code and click the VBA button to format it as shown.
Regards
MD
geekgirlau
04-16-2007, 09:26 PM
Hi Simon,
Just curious - isn't it quicker just to use the "X" in the top right corner of the Excel window? By default, if you have not saved any open workbook it will prompt you to save, then exit the application.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.