B
Bryant Lemieux
This being my first attempt at some additional functionality via VBA.
Solution Idea: Have Startshape's user cell "User.TargetShape" updated with
the NameID of the Targetshape. I plan on having the VBA code fire once a
Startshape control has been connected to a Targetshape
Dim Startshape As Visio.Shape
Dim Targetshape As String
Set Startshape = Visio.ActiveWindow.Selection.PrimaryItem
Targetshape = Visio.ActiveWindow.Selection.PrimaryItem.Connects.ToSheet.NameID
'add Targetshape name to user cell of Startshape
Startshape.Cells(User.Targetshape).Formula = "=" & Targetshape
However, I keep getting a "Runtime error "424" Object Required" message
which occurs on the last line of code.
When running this code I made sure I had both the main visio window active
as well as the Startshape (by itself) selected.
I have looked extensively for answers and have tried many different examples
to no avail.
Many thanks to all who respond!
Solution Idea: Have Startshape's user cell "User.TargetShape" updated with
the NameID of the Targetshape. I plan on having the VBA code fire once a
Startshape control has been connected to a Targetshape
Dim Startshape As Visio.Shape
Dim Targetshape As String
Set Startshape = Visio.ActiveWindow.Selection.PrimaryItem
Targetshape = Visio.ActiveWindow.Selection.PrimaryItem.Connects.ToSheet.NameID
'add Targetshape name to user cell of Startshape
Startshape.Cells(User.Targetshape).Formula = "=" & Targetshape
However, I keep getting a "Runtime error "424" Object Required" message
which occurs on the last line of code.
When running this code I made sure I had both the main visio window active
as well as the Startshape (by itself) selected.
I have looked extensively for answers and have tried many different examples
to no avail.
Many thanks to all who respond!