Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code which works fine except that the save dialog box
pops up. Having already saved the workbook I do not want the save box to display - how do I prevent it? Private Sub xxxxx() 'stuff ThisWorkbook.Save Application.Quit End Sub TIA Sandy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It should not display another message. Have you got other workbooks open than
the one you are programmatically saving ? You can stop the message by putting this before your quit statement Application.DisplayAlerts = False "Sandy" wrote: I have the following code which works fine except that the save dialog box pops up. Having already saved the workbook I do not want the save box to display - how do I prevent it? Private Sub xxxxx() 'stuff ThisWorkbook.Save Application.Quit End Sub TIA Sandy |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dennis
There were no other books open; I was however doing a 'SaveAs' which was in the code prior to 'ThisWorkbook.Save' so I suppose that might have had a bearing - your suggestion works perfectly though. Thank you. Sandy "Dennis" wrote in message ... It should not display another message. Have you got other workbooks open than the one you are programmatically saving ? You can stop the message by putting this before your quit statement Application.DisplayAlerts = False "Sandy" wrote: I have the following code which works fine except that the save dialog box pops up. Having already saved the workbook I do not want the save box to display - how do I prevent it? Private Sub xxxxx() 'stuff ThisWorkbook.Save Application.Quit End Sub TIA Sandy |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
be sure to turn alerts back on before you exit the sub. Application.displayalerts = true Regards FSt1 "Sandy" wrote: Hi Dennis There were no other books open; I was however doing a 'SaveAs' which was in the code prior to 'ThisWorkbook.Save' so I suppose that might have had a bearing - your suggestion works perfectly though. Thank you. Sandy "Dennis" wrote in message ... It should not display another message. Have you got other workbooks open than the one you are programmatically saving ? You can stop the message by putting this before your quit statement Application.DisplayAlerts = False "Sandy" wrote: I have the following code which works fine except that the save dialog box pops up. Having already saved the workbook I do not want the save box to display - how do I prevent it? Private Sub xxxxx() 'stuff ThisWorkbook.Save Application.Quit End Sub TIA Sandy |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good point!
Thanks Sandy "FSt1" wrote in message ... hi be sure to turn alerts back on before you exit the sub. Application.displayalerts = true Regards FSt1 "Sandy" wrote: Hi Dennis There were no other books open; I was however doing a 'SaveAs' which was in the code prior to 'ThisWorkbook.Save' so I suppose that might have had a bearing - your suggestion works perfectly though. Thank you. Sandy "Dennis" wrote in message ... It should not display another message. Have you got other workbooks open than the one you are programmatically saving ? You can stop the message by putting this before your quit statement Application.DisplayAlerts = False "Sandy" wrote: I have the following code which works fine except that the save dialog box pops up. Having already saved the workbook I do not want the save box to display - how do I prevent it? Private Sub xxxxx() 'stuff ThisWorkbook.Save Application.Quit End Sub TIA Sandy |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does this actually matter in this case because the next statement was
quitting the app ? Won't they automatically be back on next time Excel is loaded ? "FSt1" wrote: hi be sure to turn alerts back on before you exit the sub. Application.displayalerts = true Regards FSt1 "Sandy" wrote: Hi Dennis There were no other books open; I was however doing a 'SaveAs' which was in the code prior to 'ThisWorkbook.Save' so I suppose that might have had a bearing - your suggestion works perfectly though. Thank you. Sandy "Dennis" wrote in message ... It should not display another message. Have you got other workbooks open than the one you are programmatically saving ? You can stop the message by putting this before your quit statement Application.DisplayAlerts = False "Sandy" wrote: I have the following code which works fine except that the save dialog box pops up. Having already saved the workbook I do not want the save box to display - how do I prevent it? Private Sub xxxxx() 'stuff ThisWorkbook.Save Application.Quit End Sub TIA Sandy |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
maybe not. but it's been my experience that the two commands always be used togeather regardless ie just get in the habit of turning alerts back on just in case. Regards FSt1 "Dennis" wrote: Does this actually matter in this case because the next statement was quitting the app ? Won't they automatically be back on next time Excel is loaded ? "FSt1" wrote: hi be sure to turn alerts back on before you exit the sub. Application.displayalerts = true Regards FSt1 "Sandy" wrote: Hi Dennis There were no other books open; I was however doing a 'SaveAs' which was in the code prior to 'ThisWorkbook.Save' so I suppose that might have had a bearing - your suggestion works perfectly though. Thank you. Sandy "Dennis" wrote in message ... It should not display another message. Have you got other workbooks open than the one you are programmatically saving ? You can stop the message by putting this before your quit statement Application.DisplayAlerts = False "Sandy" wrote: I have the following code which works fine except that the save dialog box pops up. Having already saved the workbook I do not want the save box to display - how do I prevent it? Private Sub xxxxx() 'stuff ThisWorkbook.Save Application.Quit End Sub TIA Sandy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"cancel" caption doesn't show up on cancel dialog | Excel Programming | |||
ok cancel dialog box | Excel Programming | |||
Cancel Macro is user selects 'cancel' at save menu | Excel Programming | |||
Bypassing OK/Cancel Dialog Box | Excel Programming | |||
Bypassing OK/Cancel Dialog Box | Excel Programming |