Protect shape size from code?

F

Frank Gewalt

Hi there

I want to protect the shape size from VBA in Visio 2002 like
if I'm goin to Format/Protection and check the boxes for
Width and Height.

How is this done in code?

Regards, Frank
 
D

Dawn Wright [MSFT]

Frank,

In the Protection section of the ShapeSheet, you need to set LockWidth and
LockHeight to 1. For example, this will protect the width for the first
shape on the active page:

Visio.ActivePage.Shapes(1).CellsU("LockWidth").ResultIU = 1
 

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