Event of clicking on a shape

J

JuneTheSecond

Window_SelectionChanged events mighjt be one of the ways.

For example.

Option Explicit

Private WithEvents myWin As Visio.Window

Sub StartEvents()
Set myWin = ActiveWindow
End Sub

Private Sub myWin_SelectionChanged(ByVal Window As IVWindow)
If myWin.Selection.Count = 1 Then
MsgBox "You selected shape " & myWin.Selection(1).Name
End If
End Sub
 
C

Chris Roth [Visio MVP]

Hi Sam,

If you download the "Visio 2007 SDK", you'll get an Event Monitor tool.

This is super-handy for seeing what happens behind-the-scenes in Visio.

--
Hope this helps,

Chris Roth
Visio MVP


Visio Guy: Smart Graphics for Visual People
http://www.visguy.com
 

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