Q regarding double-click on protected cell

auto.pilot

Well-known Member
Joined
Sep 27, 2007
Messages
734
Office Version
  1. 365
Platform
  1. Windows
Using XL 2010, some worksheets are protected. Formulas within several protected cells refer to other worksheets. Clicking on a protected cell, I get "The cell or chart that you are trying to change is protected and therefore read-only." If I then click OK or the red X or press the escape key, I am sent to the other sheet which was referenced in the protected cell. Is there a way to prevent this? Ideally, I'd like to remain on the protected sheet and simply click Unprotect Sheet.

Thanks

jim
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try putting theis in the protected worksheet module :

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Me.ProtectContents Then
        Application.OnTime Now, Me.CodeName & ".BackHere"
    End If
End Sub

Private Sub BackHere()
    Me.Activate
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,508
Messages
6,179,188
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top