protected sheet with double click event in a column results in exclamation pop-up box... how to remove this?

OTOTO

Board Regular
Joined
Dec 23, 2013
Messages
209
I have a protected sheet with double click event:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address Like "$N*" Then
currRow = Target.Cells(1, 1).row
Set currSheet = Target.Worksheet
Load frmform1
frmform1.Show
End If
End Sub

Double clicking opens up the form but it also opens up the following message box:

Exclamantion Pop Up Box: "The cell or chart that you are trying to change is protected and therefore read-only.
To modify a protected cell or chart, first remove protection....."

Is there a way to keep the sheet protected and eliminate this popup box from rearing its ugly head?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I was able to solve this problem by changing the event to: Private Sub Worksheet_SelectionChange(ByVal Target As Range) etc.
In this manner the user single clicks on the event cell and voila
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,497
Members
448,967
Latest member
visheshkotha

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