Prevent user from defining Shape Data?

Daniel Hill
Daniel Hill used Ask the Experts™
on
Another day, another question. I'm enjoying this but it is very challenging! I guess thats why this website is here?!

I'm using DOCMD(1312) to get my users to enter data and then have some of this data appear in the shape's text field. Each time they double click they also have the option to "define shape data" but I would really like to prevent the user from doing this.

An option for "protect defined shape data" or "protect user from defining shape data" would be perfect. Any ideas??

Thanks in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Scott HelmersVisio Consultant, Trainer, Author, and Developer
Most Valuable Expert 2011

Commented:
I suspect the only way to do this would be to write code that disables the define shape data menu entries... afraid that I can't help with the specifics of how to do that but I don't know of another way.
I had a suspicion that a ShapeSheet cell was added to do this, so I asked DJP (Scott knows...) and he mentioned the LockCustProp cell in the Protection section of the ShapeSheet. This property doesn't appear in the Protection dialog, so you have to go the backway via the ShapeSheet, but it looks like you know how to do that already!

Check it out, it works!

LockCustProp.png
It also disables the Define Shape Data... menu item when you right-click in the Shape Data panel:

LockCustProp2.png
Scott HelmersVisio Consultant, Trainer, Author, and Developer
Most Valuable Expert 2011

Commented:
Excellent! More proof of the reason why I hang around at Experts Exchange. Yeah, I get to answer a few questions but I also get to be reminded of things I once new, and learn cool, new stuff (and sometimes cool, not-so-new stuff) along the way. Thanks, Chris.

Author

Commented:
Excellent, thanks guys! This has done the trick.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial