Discussion:
PageDelete event
(too old to reply)
eddie
2004-02-28 21:16:07 UTC
Permalink
When a user delete a page, Is there a way to determine the name of the page that its going to be deleted?
Al Edlund
2004-02-28 22:57:50 UTC
Permalink
you have to enable events with something like this

Private WithEvents pagObj As Visio.Page

then turn them on when the document opens

Public Sub Document_DocumentOpened(ByVal doc As IVDocument)
Set pagObj = Visio.ActivePage
End sub


and then finally I use something like this..

Private Function pagObj_QueryCancelPageDelete(ByVal Page As IVPage) As
Boolean
If LCase(Page.Name) = "project definition" Then
MsgBox "This page (Project Definition) should not be deleted"
End If
End Function

hope this helps ,
Al
Post by eddie
When a user delete a page, Is there a way to determine the name of the
page that its going to be deleted?

Loading...