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
 
Top