View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
dennis dennis is offline
external usenet poster
 
Posts: 202
Default Cancel save dialog box

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