Protecting all sheets in a workbook

A

abxy

Ok, here's my little problem: starting in a few days, i'll need to le
another department see the my workbook's data through the network
since the workbook is always being updated througout the day, it'd b
nice for them to be able to keep the workbook open and it refreshe
every so often to reflect the changes made, but at the same time als
It's *extremely* important that they can't alter any data in th
workbook whatsoever. So i'm asking for advice, what should and can
do?

thanks :
 
B

Bob Umlas

Right-click the Excel LOGO near the File menu, select View code, enter this:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Cancel = True
End Sub

Woekbook is now unsavable.
If you want to allow YOU to save it, put some text in a cell which you can
test, like "OK" in cell F1, then alter the above to:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Cancel = (Sheets(1).Range("F1").Value<>"OK")
End Sub

Bob Umlas
Excel MVP
 
A

abxy

can i change that code around some how to say, if the workbook isn't i
"this" particular path, then this code for not letting you save i
applied
 
Top