need help too
I'm having the same problem, specially when opening the project disabling macros (protection remains, but the formulas are visible).
My project is getting big (4 usrforms, macros on opening and closing, etc.).
So, I've tried with a new file, empty, some cells unblocked (data entry cells), and this code:
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
With Worksheets(1)
.Protect Password:="ggg", Contents:=True, UserInterFaceOnly:=True
.EnableSelection = xlUnlockedCells
End With
ActiveWorkbook.Save
End Sub
Private Sub Workbook_Open()
Dim wSheet As Worksheet
With Worksheets(1)
.Protect Password:="ggg", Contents:=True, UserInterFaceOnly:=True
.EnableSelection = xlUnlockedCells
End With
End Sub
This solution worked fine only after opening, unprotecting, setting the property xl..., protecting again, saving and closing. It seems that the information is recorded within the file. When reopening, it keeps the cells protected. (yes!)
But when i was applying this to my big project, it has rejected. 8(
(i believe that there is too much code, and now i have to check all, and i'm a little tired of it).
Hope it helps. Any sugestion?
best regards