SelectionChanged event

S

Stephen Dolley

How do I handle the SelectionChanged event for a Visio window?
I am trying:

Private Sub Window_SelectionChanged(ByVal Window As Visio.Window)
End Sub

but selecting and deselecting shapes does not result in this subroutine
running. However I can trap the AddShape event OK using:

Private Sub Document_ShapeAdded(ByVal Shape As Visio.IVShape)
End Sub

What am I doing wrong?
 
A

Al Edlund

did you define the with events for the window?
Al


Private WithEvents pagObj As Visio.Page
Private WithEvents appObj As Visio.Application
Private WithEvents shpObj As Visio.Shape
Private WithEvents winObj As Visio.Window
Private WithEvents docObj As Visio.Document

Private Sub winObj_SelectionChanged(ByVal Window As IVWindow)

' did something with the window

end sub
 
Top