How to Stop to Group of Shapes to be deleted

K

K

Hi all, I got few rectangle shapes on my worksheet which been grouped
together and I gave a name of "Shp" to that group. I want macro to
put in Worksheet Module that if someone try to delete that group of
shapes by selecting that group and press delete on keyboard then a
Msgbox should appear saying "Can not be Deleted" and that group should
not be deleted. Please can any friend can help
 
P

Peter T

Why not "protect" your objects.

Format, Protection. Check/uncheck "Lock" as required. Under Tools,
Protection, tick all the options then untick Edit Objects (assuming there's
nothing else you want to protect), and Protect.

With earlier versions of Excel, in the Protection dialog just tick
"Objects".

There is no simple way to intercept the user's attempt to delete objects and
prevent deletion.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top