Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Because my workbook does a lot of work before closing down, if someone was to press Cancel on the Save dialogue box it really messes things up. Is there a way in which maybe the Cancel can not be shown and be left with the Yes and No instead? Regards John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ThisWorkbook.Close (SaveChanges = True) ' will avoid the dialog box and thus
help prevent problems. Best wishes, Jim "JohnUK" wrote: Hi, Because my workbook does a lot of work before closing down, if someone was to press Cancel on the Save dialogue box it really messes things up. Is there a way in which maybe the Cancel can not be shown and be left with the Yes and No instead? Regards John |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jim,
After a bit of trying & testing I finaly got this to work. Many thanks - Greatly Appreciated Regards John PS I did try changing the True to False but for some reason that didnt want to know Msg = "Save changes to Workbook?" Style = msoAlertButtonYesNo + vbCritical + vbDefaultButton1 Title = "SAVE WORKBOOK?" Ctxt = 1000 Response = MsgBox(Msg, Style, Title, Help, Ctxt) If Response = vbYes Then ActiveWorkbook.Save ThisWorkbook.Close (SaveChanges = True) Else ThisWorkbook.Close (SaveChanges = True) End If "Jim Jackson" wrote: ThisWorkbook.Close (SaveChanges = True) ' will avoid the dialog box and thus help prevent problems. Best wishes, Jim "JohnUK" wrote: Hi, Because my workbook does a lot of work before closing down, if someone was to press Cancel on the Save dialogue box it really messes things up. Is there a way in which maybe the Cancel can not be shown and be left with the Yes and No instead? Regards John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto_Close() not running | Excel Programming | |||
BeforeClose vs Auto_Close | Excel Programming | |||
Question about auto_close | Excel Programming | |||
Auto_Close() needs help | Excel Programming | |||
Auto_Close | Excel Programming |