Hello, the situation is that I have many shapes in 1 sheets
1. some shapes I want the user to be able to modify
2. some shapes I don't want the user to be able to do anything with it
3. I want the user to be able to insert new shapes as they wish
Here is what I have tried so far
Method 1:
- If I protected the whole sheet and don't allow "Edit Object"
- Unlock all the shapes I want the use to modify
- Lock shapes that I don't want user to modify.
I can accomplished 1&2 but user won't be able to insert new shapes (because I locked "Edit Object".
Method 2:
- If I protected the whole sheet BUT allow "Edit Object"
I can accomplished 1&3 but user can modify/delete any shapes including the ones I don't want them to be able to do it.
My next idea and I'm not sure if it is possible or not (I have been searching but didn't find anything on this), is to write a VBA code that can identify if the particular shape is being selected (specified by name e.g. if any of these name -> Oval 1/Oval 2/Rectangle 1 being selected/active) Then deselect the object -> lock sheet and Don't allow "Edit Object" but when user don't select any of those specified objects it can go to lock sheet and allow "Edit Object".
Is it possible to write VBA code for the idea above? I think I can't use Private Sub Worksheet_Change(ByVal Target as Range) to catch the object selection, right? Any recommendation will be much appreciated.
Thank you
1. some shapes I want the user to be able to modify
2. some shapes I don't want the user to be able to do anything with it
3. I want the user to be able to insert new shapes as they wish
Here is what I have tried so far
Method 1:
- If I protected the whole sheet and don't allow "Edit Object"
- Unlock all the shapes I want the use to modify
- Lock shapes that I don't want user to modify.
I can accomplished 1&2 but user won't be able to insert new shapes (because I locked "Edit Object".
Method 2:
- If I protected the whole sheet BUT allow "Edit Object"
I can accomplished 1&3 but user can modify/delete any shapes including the ones I don't want them to be able to do it.
My next idea and I'm not sure if it is possible or not (I have been searching but didn't find anything on this), is to write a VBA code that can identify if the particular shape is being selected (specified by name e.g. if any of these name -> Oval 1/Oval 2/Rectangle 1 being selected/active) Then deselect the object -> lock sheet and Don't allow "Edit Object" but when user don't select any of those specified objects it can go to lock sheet and allow "Edit Object".
Is it possible to write VBA code for the idea above? I think I can't use Private Sub Worksheet_Change(ByVal Target as Range) to catch the object selection, right? Any recommendation will be much appreciated.
Thank you