Rick Clark
04-18-2006, 03:14 AM
I have a spreadsheet which use a VBA to change data, color and font in a selection of locked cells. The rest of the cells are unlocked and selectable.
It currently does this by unprotecting the sheet clearing the data and then reprotecting the sheet. However when the sheet is closed and reopened the locked cells become selectable by the user.
I can fix it by opening with the following statement however it asks for a password to unprotect without being prompted to..
With Worksheets("front page")
.EnableSelection = xlUnlockedCells
.EnableAutoFilter = True
.Protect Contents:=True, UserInterfaceOnly:=True
End With
Is there an answer for either problem, it is important that the users do not have access to change the protected cells. I am up against a gun to get this done I would appreciate any help I can get. If it is easier my email is ricclark2000@yahoo.com Thank You
It currently does this by unprotecting the sheet clearing the data and then reprotecting the sheet. However when the sheet is closed and reopened the locked cells become selectable by the user.
I can fix it by opening with the following statement however it asks for a password to unprotect without being prompted to..
With Worksheets("front page")
.EnableSelection = xlUnlockedCells
.EnableAutoFilter = True
.Protect Contents:=True, UserInterfaceOnly:=True
End With
Is there an answer for either problem, it is important that the users do not have access to change the protected cells. I am up against a gun to get this done I would appreciate any help I can get. If it is easier my email is ricclark2000@yahoo.com Thank You