S
SteveM
I have some shapes that I have assigned to the Layer "LayerName". I
then cycled through the shapes using the code construct (I think) of
the http://visio.mvps.org/VBA.htm site.
Dim vShape as Shape
For Each vShape In ActivePage.Layers("LayerName").Page.Shapes
Do some stuff
Next
Which works fine until I add a CommandButton control to the page. The
For Each loop then includes the Button when it cycles even though the
Button has not been assigned to the LayerName Layer.
Can anyone set me straight on restricting loop access to only the
shapes in the named layer?
Thanks Much,
Steve
then cycled through the shapes using the code construct (I think) of
the http://visio.mvps.org/VBA.htm site.
Dim vShape as Shape
For Each vShape In ActivePage.Layers("LayerName").Page.Shapes
Do some stuff
Next
Which works fine until I add a CommandButton control to the page. The
For Each loop then includes the Button when it cycles even though the
Button has not been assigned to the LayerName Layer.
Can anyone set me straight on restricting loop access to only the
shapes in the named layer?
Thanks Much,
Steve