Q
Qinghua
Hi,
I need to trigger the BeforeShapeDelete Event and add some codes inside.
Currently, I create a variable in ThisDocument object like the following:
Private WithEvents CurrentPage As Visio.Page
And in DocumentOpened event, I set the variable as follows:
Set CurrentPage = Application.ActivePage
However, when I delete a shape, it never jumps to the event sub:
Private Sub CurrentPage_BeforeShapeDelete(ByVal Shape As IVShape)
Is this the right way to use the event sub? I checked the msdn about
BeforeShapeDelete and it is said I need to use Add and AddAdvise to add the
event into the EventList. Is there a example?
Thanks!
Qinghua
I need to trigger the BeforeShapeDelete Event and add some codes inside.
Currently, I create a variable in ThisDocument object like the following:
Private WithEvents CurrentPage As Visio.Page
And in DocumentOpened event, I set the variable as follows:
Set CurrentPage = Application.ActivePage
However, when I delete a shape, it never jumps to the event sub:
Private Sub CurrentPage_BeforeShapeDelete(ByVal Shape As IVShape)
Is this the right way to use the event sub? I checked the msdn about
BeforeShapeDelete and it is said I need to use Add and AddAdvise to add the
event into the EventList. Is there a example?
Thanks!
Qinghua