removing connection points

X

xargon

Hi all,

I am having problems removing connection points from a shape through VBA.
Here is what I am trying:

If myShape.SectionExists(visSectionConnectionPts, 0) Then
Dim count As Integer
For count = myShape.Section(visSectionConnectionPts).count - 1 To 0
Step -1
myShape.DeleteRow visSectionConnectionPts, count
Next count
myShape.DeleteSection visSectionConnectionPts
End If

Do not know why this should not work. Unless there is some restriction on
removing connection points.

Cheers!
xargon
 
J

JuneTheSecond

Your program works fine in my PC.
I've just added lines to define myShape
Dim myShape As Visio.Shape
Set myShape = ActivePage.Shapes(1)
 
Top