how to close Read Only file without prompt to save copy

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hi
I'm working on an Excel file that will always be opened as Read Only by users.
To save confusion I would rather the user is not prompted to save the file
on exit.
I've tried application.displayAlerts = False in the Workbook BeroreClose
event code
but no joy so far.
Is it posible to achieve this?
Thanks
 
Thanks Jacob (I made sure to click on yes)

Worked fine

Is there any way to close the application "shell" along with the file
as is usual with only a single file open?
 
Ofcourse YES; Try the below. Be careful this will quit the app; even if you
have other workbooks open..


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayAlerts = False
Application.Quit
End Sub
 
Back
Top