G
goldnhue
(Visio 2007 with Vista)
I am storing Visio shape information in a database using the Shape's
"UniqueID" field as the unique identifier. As part of my VBA sync routine,
I cycle through the database and check for a Visio Shape that has each
UniqueID. If none exists, Visio generates an error which I trap so I'll know
which records to delete. This works great EXCEPT it sometimes generates an
error even when the shape does exist, and I cannot isolate why! The error
(-2032465756) is repeatable consistently on the same shapes, but I can't
isolate what is different about those shapes to cause the error. Any
suggestions? What should I be checking for?
Here is codes snippet:
' For each record, check for a related activity box
Do While Not objRS.EOF
UnID = objRS("UniqueID")
Set shpObj = Visio.ActivePage.Shapes.Item(UnID)
' If there is no Visio shape with this UnID, it will
generate an
' error which I trap then resume next
objRS.movenext
Loop
Thank you in advance,
Gina
I am storing Visio shape information in a database using the Shape's
"UniqueID" field as the unique identifier. As part of my VBA sync routine,
I cycle through the database and check for a Visio Shape that has each
UniqueID. If none exists, Visio generates an error which I trap so I'll know
which records to delete. This works great EXCEPT it sometimes generates an
error even when the shape does exist, and I cannot isolate why! The error
(-2032465756) is repeatable consistently on the same shapes, but I can't
isolate what is different about those shapes to cause the error. Any
suggestions? What should I be checking for?
Here is codes snippet:
' For each record, check for a related activity box
Do While Not objRS.EOF
UnID = objRS("UniqueID")
Set shpObj = Visio.ActivePage.Shapes.Item(UnID)
' If there is no Visio shape with this UnID, it will
generate an
' error which I trap then resume next
objRS.movenext
Loop
Thank you in advance,
Gina