Dialog box on shape drop

X

xargon

Hi everyone,

I am totally new to VB and VBA programming. I am trying to do something
simple in Visio and am wondering if someone can help me with it:

Basically, every time I drop a shape on a Visio worksheet, I want a
custom
dialog to show up. How can I do that? Any example on ho to do it would be
so greatly appreciated!

Thanks!
xargon
 
C

Chris Roth [ Visio MVP ]

Check out the CallThis topic in the Developer Reference .

You'll set a formula in the ShapeSheet of a Visio shape. Something like:

Events section:

EventDrop = CALLTHIS( "VBA_ProcName" )

In your VBA project, you'll have something like this:

Public Sub VBA_ProcName( shp as Visio.Shape )
MsgBox "Hello World: I was called by shape # " & shp.ID
End Sub

Double-check the help's example, because I might have forgotten an argument
in the Shapesheet formula.

--

Hope this helps,

Chris Roth
Visio MVP
 

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