ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Hi all!! Suppressing the "Do you want to save changes" (https://www.excelbanter.com/excel-worksheet-functions/10821-hi-all-suppressing-%22do-you-want-save-changes%22.html)

Bony Pony

Hi all!! Suppressing the "Do you want to save changes"
 
message when I haven't made any! I know I can open it
read-only but I was wondering if there is a way to switch
the alert off.

I have tried application.displayalerts = false but that
doesn't do it.

Any ideas anyone?
Thanks in advance!

Bony Pony

Bernie Deitrick

Bony,

You need to use a macro:

Sub CloseWithoutAlert()
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub

HTH,
Bernie
MS Excel MVP

"Bony Pony" wrote in message
...
message when I haven't made any! I know I can open it
read-only but I was wondering if there is a way to switch
the alert off.

I have tried application.displayalerts = false but that
doesn't do it.

Any ideas anyone?
Thanks in advance!

Bony Pony




Bony Pony

Hi Bernie,
Thank you very much.

Have a good day!

Robert
-----Original Message-----
Bony,

You need to use a macro:

Sub CloseWithoutAlert()
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub

HTH,
Bernie
MS Excel MVP

"Bony Pony" wrote

in message
...
message when I haven't made any! I know I can open it
read-only but I was wondering if there is a way to

switch
the alert off.

I have tried application.displayalerts = false but that
doesn't do it.

Any ideas anyone?
Thanks in advance!

Bony Pony



.



All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com