Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close file without saving
Hi,
I'm having problems with this one. I am entering your second code in "this workbook" after other code. The application display alerts is still showing the "do you want to save" screen and I'm getting an error message when I put in - this workbook. close savechanges: = false Any ideaqs ? Mike "Jarek" wrote: Hi, Private Sub Auto_Close() ThisWorkbook.Saved = True 'does not save the workbook, only marks it as saved ThisWorkbook.Close False End Sub or Private Sub Auto_Close() Application.DisplayAlerts = False 'to eliminate prompt "Do you want to save?" ThisWorkbook.Close SaveChanges:=False End Sub Jarek -- Jarek ------------------------------------------------------------------------ Jarek's Profile: http://www.excelforum.com/member.php...nfo&userid=965 View this thread: http://www.excelforum.com/showthread...hreadid=319815 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close file without saving
hi.i'm only starting to learn this, but try calling the next macro before the
end of your first macro... like before "end sub", type "call (your macro name)" learned it from joel... thanks joel "Mike" wrote: Hi, I'm having problems with this one. I am entering your second code in "this workbook" after other code. The application display alerts is still showing the "do you want to save" screen and I'm getting an error message when I put in - this workbook. close savechanges: = false Any ideaqs ? Mike "Jarek" wrote: Hi, Private Sub Auto_Close() ThisWorkbook.Saved = True 'does not save the workbook, only marks it as saved ThisWorkbook.Close False End Sub or Private Sub Auto_Close() Application.DisplayAlerts = False 'to eliminate prompt "Do you want to save?" ThisWorkbook.Close SaveChanges:=False End Sub Jarek -- Jarek ------------------------------------------------------------------------ Jarek's Profile: http://www.excelforum.com/member.php...nfo&userid=965 View this thread: http://www.excelforum.com/showthread...hreadid=319815 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If I close a file without saving changes, can I get the autosaved | Excel Discussion (Misc queries) | |||
Programatically close a file without saving | Excel Programming | |||
Close file without saving | Excel Programming | |||
Close file without saving | Excel Programming | |||
Close file without saving data | Excel Programming |