Supressing "Do you want to save the changes you made to <file?" message
No problem, u da man !!
Jim
"Norman Jones" wrote in message
:
Hi Jim,
I missed the word "most"! Well spotted!
That being the case, try something like:
'=============
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Arr As Variant
Dim Res As Variant
Arr = VBA.Array("Chrissol", "Jim", "Bob", "Norman")
Res = Application.Match(Environ("UserName"), Arr, 0)
Me.Saved = IsError(Res)
End Sub
'<<=============
The array values correspond to the users who do have
write permission.
---
Regards,
Norman
"JMay" wrote in message
...
Thanks Bob, But OP says (that):
I have an Excel system that most of my users are only allowed to open
and view read-only
Just thought I'd mention.
"Bob Phillips" wrote in message
:
If it is read-only, they can't save it anyway.
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my
addy)
"JMay" wrote in message
...
But what is a change is made AND it needs to be Saved?
Wont this code (at present) close the WB, without saving such changes?
TIA,
Jim
|