PresentationClose event missing Cancel

R

relic91

hey everyone,

What's the deal with the powerpoint presentation close event not
publishing a cancel variable? Does anyone know of a way around this,
perhaps an API-level way to halt the rest of the close execution after
the close event?

I know you can use commandbar events to trap the close and exit mouse
clicks, but I don't know a similar way to trap the "x" clicks for the
presentation or the application. I considered using some form of
windows hooks, but I'm finding it increasingly difficult to isolate
these particular events, or to isolate the windows to create a
pseudo-beforeclose event. If anyone has looked into this before or has
heard of any workarounds, they would be very appreciated.

Thanks,
Arvind
 
B

Brian Reilly, MS MVP

Arvind,
The default setting for a Msgbox is for VBOK only. You can change it
like this.
MsgBox "Hello", vbOKCancel, "Title of Message Box"

Type that in the VBE and see the extra choices in IntelliSense

Brian Reilly, MVP
 
R

relic91

Brian,

Thanks for responding. I'm not sure I understand, though. There aren't
really any message boxes involved. I'm talking about the Powerpoint
published PresentationClose _event_ for add-ins. It does not pass in a
Cancel parameter the way, for example, the Word DocumentBeforeClose
event does, therefore giving you no way of cancelling the close from
the event handler (which is what I'm trying to do). The "x" clicks I'm
talking about are the x's in the Powerpoint application at the top
right corner of the screen that cause either a close on the
presentation or a close on the application.

Thanks,
Arvind
 

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

Similar Threads


Top