prevent screen pop up

kelly mort

Well-known Member
Joined
Apr 10, 2017
Messages
2,169
Office Version
  1. 2016
Platform
  1. Windows
Hello All,
I want to stop excel from showing MsgBox when I double click on locked cells.
Thanks in advance.
Kelly
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Where should I place it? I placed it in workbook open event but did not work
 
Upvote 0
Hello All,
I want to stop excel from showing MsgBox when I double click on locked cells.
Thanks in advance.
Kelly
I think there are three separate options you could consider. One of these may suit you.

1. When you protect the sheet, remove the tick from allowing users to 'Select locked cells'

2. File -> Options -> Advanced -> Remove tick from 'Allow editing directly in cells' -> OK

3. Right-click the sheet name tab and choose 'View Code'. Paste the code below into to right hand pane that opens.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  Cancel = True
End Sub
 
Upvote 0
I think there are three separate options you could consider. One of these may suit you.

1. When you protect the sheet, remove the tick from allowing users to 'Select locked cells'

2. File -> Options -> Advanced -> Remove tick from 'Allow editing directly in cells' -> OK

3. Right-click the sheet name tab and choose 'View Code'. Paste the code below into to right hand pane that opens.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  Cancel = True
End Sub

Okay 2 and 3 worked for me. Thanks .
Kelly
 
Upvote 0
Okay 2 and 3 worked for me. Thanks .
Kelly
You are welcome.
Of course you shouldn't need both as either one would do the same job, but I assume that is what you meant anyway. :)
(Hopefully 1 'worked' too, but just didn't suit your circumstances)
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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