How to cancel BeforeSelectionDelete ????? 
Author Message
 How to cancel BeforeSelectionDelete ?????

Hi,
Hope someone clever can help me!

I'm trying to trap the Document_BeforeSelectionDelete event ... and my event
trap works great.  Only problem is that within the trap I want to cancel the
delete event.

I guess this must be possible, or what would the point be in having all
these Document_Beforexxx events.

Anyone help me ?
Need help in a hurry!

Cheers,
Paul Wallis



Sat, 31 Jul 2004 02:21:33 GMT  
 How to cancel BeforeSelectionDelete ?????
Graham is better at answering this question, but I will give it a try.

When you trap the BeforeSelectionDelete, you are already committed to the
deletion. It's purpose is to allow you to do some house cleaning before the
deletion occurs. For example, if the shape is connected to another shape,
the connection line can be removed.

Graham's recommendation for preventing the event is to use the QuerCancelxxx
events rather than the Beforexxx events.

John...    Visio MVP

Need stencils or ideas? http://www.magma.ca/~lancucki/Visio3rdparty.htm
Need VBA examples?   http://www.magma.ca/~lancucki/Visio_VBA_Information.htm


Quote:
> Hi,
> Hope someone clever can help me!

> I'm trying to trap the Document_BeforeSelectionDelete event ... and my
event
> trap works great.  Only problem is that within the trap I want to cancel
the
> delete event.

> I guess this must be possible, or what would the point be in having all
> these Document_Beforexxx events.

> Anyone help me ?
> Need help in a hurry!

> Cheers,
> Paul Wallis



Fri, 27 Aug 2004 23:55:54 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. cancel subform=cancel mainform

2. How to Cancel Execution with Cancel Button?

3. Q: When does a Cancel button *mean* Cancel?

4. Help - Cancel & Default Property for Cancel button (Repost)

5. End or cancel Close action

6. the OpenForm action was canceled

7. Run-time Error 2001: You canceled the previous operation

8. "You canceled the previous operation"

9. RunCommand Action was canceled/Unload event

10. OpenForm action was canceled

11. Cancel Output on No Data?

12. suppress OpenReport action canceled message

 

 
Powered by phpBB® Forum Software