How to have workbook automatically protect when closed (or opened)
On May 16, 1:04 pm, Mike wrote:
Paste this into the ThisWorkbook Module
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Replace "Password" with your password that you use
'this will set password when closing workbook
ActiveSheet.Protect "Password", True
ActiveWorkbook.Protect "Password", True
End Sub
" wrote:
Hi,
I have a spreadsheet (MS Excel 2003) that is currently shared over a
network among many users. Currently, we have some columns protected
from editing. However, some of the user base who edit the sheet and
have the password tend to not protect the workbook again after they
are doing edits (managers).
Anyone know of a macro or other method that would have the workbook
automatically be protected, even if it was saved unprotected? Possibly
protected on close/open, or on save?
Thanks,
Drew
Wow, awesome thanks for the quick response, works perfectly~
|