Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yeah I'll just delete the button and stick with this method.
Thanks. Jim Thomlinson wrote: How about in the before close event add in the save. Add this code to the ThisWorkbook module (right click the XL icon next to the word file in Excel and select View Code) Private Sub Workbook_BeforeClose(Cancel As Boolean) If Not ThisWorkbook.Saved Then ThisWorkbook.Save End Sub -- HTH... Jim Thomlinson "mike" wrote: How can I force this? Can I? I need to make sure the workbook is saved before it's closed, make sure it's not closed without being saved. I have a "Close" button that goes to a macro that saves. I thought of putting a save macro in as workbook.deactivate code, but then my button would be redundant. Should I just lose the button and stick with workbook.deactivate? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Ability to close a worksheet and email using a macro button | Excel Discussion (Misc queries) | |||
Macro to Prompt User to Close After Saving | Excel Discussion (Misc queries) | |||
Close user form when button is pressed | Excel Programming | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
excel - Windows close button (x) should only close active workboo. | Setting up and Configuration of Excel |