Making a shape a member of two layers

R

Rob Stok

I have some shapes on a drawing.
I would like to make some shapes a member of one layer and some shapes
a member of two or more layers.

I have no problem with making a shape a member of one layer with:
shpObjConnector.Cells("LayerMember") = "4"

However for more than one layer I get a type mismatch error trying
this:
shpObjConnector.Cells("LayerMember") = "4;7"

If I type "4;7" into the shapesheet it works fine. How do I do this
from VBA?
I'm using Visio 2002.

Thanks
Rob
 
A

Al Edlund

this from the Developing Visio Solutions

al



Assigning shapes to and removing shapes from layers

layerObj.Add shpObj, preserveMembersFlag

To assign a shape to a layer, use the Add method of the Layer object. For
example:

The preserveMembersFlag argument should be non-zero (True) if you're
assigning a

group to the layer but you don't want to affect the layer membership of
shapes within

that group. Otherwise, use 0 (False) to assign a single shape or a group and
each of its

members to that layer
 

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