I am trying to compare elements of the shapes via double for loop when I find the property I wanted I had to add in a connector shape but then it messes up the shape count.
My code looks like the following:
For intCount = 1 To pagThisPage.Shapes.Count - 1
Set shape1 = pagThisPage.Shapes.Item(intCount)
For intCount2 = intCount + 1 To pagThisPage.Shapes.Count
Set shape2 = pagThisPage.Shapes.Item(intCount2)
If shape1.Cells("Prop.StepNumber").ResultInt(visNumber, 0) =
shape2.Cells("Prop.StepNumber").ResultInt(visNumber, 0) Then
'if property equal drop a connection between the two entries
Set shpConnector = pagThisPage.Drop(mstConnector, 0#, 0#)
What can I do to prevent adding in new shapes interfering with reading the shapes already there?
My code looks like the following:
For intCount = 1 To pagThisPage.Shapes.Count - 1
Set shape1 = pagThisPage.Shapes.Item(intCount)
For intCount2 = intCount + 1 To pagThisPage.Shapes.Count
Set shape2 = pagThisPage.Shapes.Item(intCount2)
If shape1.Cells("Prop.StepNumber").ResultInt(visNumber, 0) =
shape2.Cells("Prop.StepNumber").ResultInt(visNumber, 0) Then
'if property equal drop a connection between the two entries
Set shpConnector = pagThisPage.Drop(mstConnector, 0#, 0#)
What can I do to prevent adding in new shapes interfering with reading the shapes already there?