newbie - trigger EventDrop and EventDblClk events using VB6

K

kalpana

hi all,

i am trying to integrate visio with VB6.
i am creating stencils with masters dynamically.
i want to trigger the EventDrop and EventDblClk events
using VB6. how do i do this. A sample code will be better.

thanks
kalpana
 
G

GMorris

I ran into this same problem (I use Visio 5.0) a while back, and
never could find a way to trigger those through VB events. One
way I got around it was to write to the shape's EventXFMod or
other event cells when the shape is created that will call the sub
or function that you want to run.

My example was using a Dynamic connector to pass information
between connected shapes, and using the Document_ShapeAdded
event worked fine when dropping the connector. The problem was,
I wanted to fire the same event when it was MOVED, so I ended
up writing a sub in a module that calls ShapeAdded and in the
ShapeAdded I write "=RUNADDON(""Connector_Moved"")" to
the EventXFMod cell. Connector_Moved is the sub that I wrote.
Works like a charm. Sometimes you just have to make the best of
what Visio's programming interface has to offer.
 
K

kalpana

it will be more helpfull if you can put the code what you
have written back to me.
Can you tell how to call the RUNADDON in VB6.0?
I am getting the Error as "RUNADDON Sub or procedure
undefined"

Thanks in advance.
 

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