Say I have a workbook with two worksheets in it.
I protect sheet2 via following code:
Sub test()
Worksheets(2).Cells.Locked = True
Worksheets(2).Protect DrawingObjects:=False
End sub
(I've set DrawingObjects:=False because I still want to be able to edit forms)
Protection does what I expect it to on sheet2 and when I double-click a cell it displays the warning "The cell or chart you're trying to change is on a protected sheet. To make a change, unprotect the sheet. You might be requested to enter a password.".
However, if the double-clicked cell contains for example a SUM formula, it highlights the range to which the formula refers to. If it's a SUMIFS formula that refers to ranges in sheet1, it activates sheet1.
Any ideas on how this can be prevented without disabling double-clicking?
Thank you.

