View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Supressing "Do you want to save the changes you made to <file?" message

Hi Chrisso,

Try:

'=============
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Saved = True
End Sub
'<<=============


---
Regards,
Norman


"Chrisso" wrote in message
oups.com...
Hi there

I have an Excel system that most of my users are only allowed to open
and view read-only.

I have volatile formulaes that mean that even when the user just views
and changes nothing when they close the file Excel asks them:

"Do you want to save the changes you made to <file?"

The problem is that this confuses the user as they now think they have
made a change.

I was hoping to suppress this message and replace with my own more
helpful message - but I got stuck at the first part:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Workbook_BeforeClose"
Application.DisplayAlerts = False
End Sub

Seems disabling alerts is not good enough. Does anyone know how I can
supress the above message?

Thanks for any ideas.
Chrisso