I am trying to secure a workbook using the UserInterfaceOnly
function, which runs on Workbook_Open
, and it's working great.
However, I recently learned that I have to allow people to paste a picture in to the worksheet, so I added DrawingObject:=False
. This has resulted in the apparent effect of the worksheet being locked in name only, but allowing full edit on locked and unlocked cells.
Any ideas would be greatly appreciated.
Private Sub Workbook_Open()
Sheets("Template").Protect Password:="", UserInterfaceOnly:=True, DrawingObjects:=False
End Sub
Did some playing around and found that adding
Contents:=True
is required to reset cell protections. Not sure if this is the ideal solution, but it worked. Not sure if leaving it as an answer or edit to my questions is preferable.