Setting shapesheet cell values

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!
 
B

Bryant Lemieux

Thanks for the suggestion, Unfortunately, I'm getting the same error.

I know it's something simple
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top