Jaafar Tribak
Well-known Member
- Joined
- Dec 5, 2002
- Messages
- 9,797
- Office Version
- 2016
- Platform
- Windows
Hi dear forum members,
I have the following scenario:
1- Add data validation list to cell A1.
2- Unlock the DV cell (A1) and Protect the worksheet.
3- I have the following code that displays a Msgbox upon double clicking the DV cell (A1):
PROBLEM:
if the worksheet is protected with the Edit Objects option CheckBox left unticked then the Msgbox never gets a chance to be displayed.
I have to make sure that I tick the Edit Objects in order for the MsgBox to be displayed.
The problem I am facing now is that if I tick the Edit Objects option when protecting the worksheet then all other objects, shapes etc that I have on the worksheet can be moved, resized, deleted by the user which I obviously want to avoid at all cost.
Can anybody think of a work around this problem ?
Using Excel 2016.
Thank You.
I have the following scenario:
1- Add data validation list to cell A1.
2- Unlock the DV cell (A1) and Protect the worksheet.
3- I have the following code that displays a Msgbox upon double clicking the DV cell (A1):
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = Range("A1").Address Then
Cancel = True
MsgBox "hello"
End If
End Sub
PROBLEM:
if the worksheet is protected with the Edit Objects option CheckBox left unticked then the Msgbox never gets a chance to be displayed.
I have to make sure that I tick the Edit Objects in order for the MsgBox to be displayed.
The problem I am facing now is that if I tick the Edit Objects option when protecting the worksheet then all other objects, shapes etc that I have on the worksheet can be moved, resized, deleted by the user which I obviously want to avoid at all cost.
Can anybody think of a work around this problem ?
Using Excel 2016.
Thank You.