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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

OTOTO

Board Regular
Joined
Dec 23, 2013
Messages
209
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
 

Forum statistics

Threads
1,137,296
Messages
5,680,672
Members
419,924
Latest member
Dhamodharan992

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
Top