M
Michael Hlavinka
Why is the QueryCancelQuit event being fired more than
once in Visio 2002/SR-1. (It does not appear to be fired
more than once in Visio 2003.) Consider the following
code:
Dim WithEvents A As Application
Dim Count As Long
Sub setit()
Set A = New Visio.Application
A.Visible = True
Count = 0
End Sub
Private Function A_QueryCancelQuit(ByVal app As
IVApplication) As Boolean
Count = Count + 1
A_QueryCancelQuit = False
End Function
Sub reset()
MsgBox Count
Set A = Nothing
End Sub
If you run the setit macro to create a new instance of
Visio, then immediately close the new instance using the
File->Exit menu item, you receive two calls to the
QueryCancelQuit event. You can run the reset macro after
the application shuts down to get the count value.
If you cancel on the second call, the application
continues to shutdown.
I believe this is some sort of bug. Is this a known
problem that was fixed in Visio 2003?
Thanks,
Michael
once in Visio 2002/SR-1. (It does not appear to be fired
more than once in Visio 2003.) Consider the following
code:
Dim WithEvents A As Application
Dim Count As Long
Sub setit()
Set A = New Visio.Application
A.Visible = True
Count = 0
End Sub
Private Function A_QueryCancelQuit(ByVal app As
IVApplication) As Boolean
Count = Count + 1
A_QueryCancelQuit = False
End Function
Sub reset()
MsgBox Count
Set A = Nothing
End Sub
If you run the setit macro to create a new instance of
Visio, then immediately close the new instance using the
File->Exit menu item, you receive two calls to the
QueryCancelQuit event. You can run the reset macro after
the application shuts down to get the count value.
If you cancel on the second call, the application
continues to shutdown.
I believe this is some sort of bug. Is this a known
problem that was fixed in Visio 2003?
Thanks,
Michael