Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Write macro don't ask to save when exit excel
Hi all
I need to write a macro that when I exit Excel (or close document) by clickin in the Red Cross of Excel Officce XP) domn't ask to save a document. I've already tested some parts of code as show below: strName = Activeworkbook.name workbooks(strName).Close SaveChanges:=False ThisWorkbook.Saved = True Application.Quit Application.DisplayAlerts=False Application.EnableEvents = False Private Sub Workbook_BeforeClose(Cancel As Boolean) If Me.Saved = False Then Me.Saved = True End Sub but all of them don't worked like I want. Anybody knows?? Thanks in advance Rui Ávares |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why does Excel ask to Save on Exit? | Excel Discussion (Misc queries) | |||
how do I write a request to 'Save As' Macro | Excel Discussion (Misc queries) | |||
Excel 2003 Will Not Save On Exit | Excel Discussion (Misc queries) | |||
Macro: Exit active workbook without save? | Excel Worksheet Functions | |||
How do I write a macro in XL that will delete 1st row and save th. | Excel Programming |