I'm creating a macro that automatically creates a visio diagram from an excel spreadsheet where the diagram is representative of connections in a row on the excel spreadsheet. I'm getting this error and i can't find out the reason, be aware i am reasonably inexperienced at vba. My problem arises when i try to place connections between two objects that have already been placed. to call these objects again i am trying to use their unique id's but for some reason i can't get past the first hurdle.
if theres any insight you can offer to help i'd be glad, forgive the messy code!
While Current_Row < Last_Row
While current_object <= counter
object = "Ellipse." & current_object
Set ShpObj = AppVisio.ActivePage.Shapes(object)
If ShpObj.Text = Worksheets("TempSheet").Cells(Current_Row, COLUMN2).Value Then
While current_get <= counter
object = "Ellipse." & current_get
ShpObj2 = AppVisio.ActivePage.Shapes(object)
If ShpObj2.Text = Worksheets("TempSheet").Cells(Current_Row, COLUMN2).Value Then
ShpObj2.AutoConnect ShpObj, visioAutoconnecDirRight, connector '(setting the color and label)
Set ShpObj2 = Nothing
End If
current_get = current_get + 1
Wend
End If
current_object = current_object + 1
current_get = 1
Set ShpObj = Nothing
Wend
So thats the block thats causing the issue, if you'd like to see the rest of the modules you can find it in a forum post here http://visguy.com/vgforum/index.php?topic=4633.0