PageDelete event

E

eddie

When a user delete a page, Is there a way to determine the name of the page that its going to be deleted?
 
A

Al Edlund

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


eddie said:
When a user delete a page, Is there a way to determine the name of the
page that its going to be deleted?
 

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