Worksheet_SelectionChange won't work with Protected Sheet

LuisV805

New Member
Joined
Jan 9, 2014
Messages
23
The event is triggered just fine when the worksheet is not protected. When I protect it, however, this event is no longer being triggered. Nothing else has changed. Is this how Excel is supposed to work? Not sure if I'm missing something here...
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
SelectionChange works on protected sheets.
Do you have any unlocked cells & when protecting the sheet did you allow "Select locked cells"
 
Upvote 0
Yes, I left some cells unlocked. "Select Locked Cells" is turned off. I don't want the user to be able to selected Locked Cells. I can change the selection while the sheet is protected though, but the event is just not triggering.

I tried using a breakpoint to stop the code on the sub's first line, but it's not stopping on it.
 
Upvote 0
Put this in a standard module & run it
Code:
Sub chk()
Application.EnableEvents = True
End Sub
Then try you selectionchange event again
 
Upvote 0
I checked and Application.EnableEvents was still set to True. I ran the sub you mentioned anyways just for kicks, but with the same results. Also confirmed the Worksheet_Change is firing without any issues either. Not sure why, but looks like this is normal Excel behavior.

I was able to work around the issue, though. by protecting the sheet programatically, I can set UserInterfaceOnly to True. Doing this allows the event to trigger as normal without any issues.

Hope this helps if anybody runs into the same issue!
 
Upvote 0
Glad you got it sorted & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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