A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

multiple event handlers



 
 
Thread Tools Display Modes
  #1  
Old July 15th, 2008, 09:26 PM posted to microsoft.public.powerpoint
theintern
external usenet poster
 
Posts: 58
Default multiple event handlers

Does anyone know how to create multiple event handlers? I want to have the
same event fire on two different events, PresentationOpen (as seen below) and
SlideShowEnd. See code below.

Module 1:
Public cPPTObject As New EventClass

Sub Auto_Open()
'set an application reference to the event-enabled object
Set cPPTObject.PPTEvent = Application
End Sub

Module 2:
Sub CreateShow()
all the stuff i want it to do
End sub

Class module:
Public WithEvents PPTEvent As Application

Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation)
CreateShow
End Sub

i tried some stuff, but all of it is just guess, so i figured it'd be faster
to just ask.

thanks
scott

  #2  
Old July 15th, 2008, 10:37 PM posted to microsoft.public.powerpoint
Austin Myers
external usenet poster
 
Posts: 1,631
Default multiple event handlers

This should help:
http://skp.mvps.org/setview.htm


Austin Myers
Microsoft PowerPoint MVP Team

Creator of PFCPro, PFCMedia and PFCExpress
http://www.playsforcertain.com


"theintern" wrote in message
...
Does anyone know how to create multiple event handlers? I want to have
the
same event fire on two different events, PresentationOpen (as seen below)
and
SlideShowEnd. See code below.

Module 1:
Public cPPTObject As New EventClass

Sub Auto_Open()
'set an application reference to the event-enabled object
Set cPPTObject.PPTEvent = Application
End Sub

Module 2:
Sub CreateShow()
all the stuff i want it to do
End sub

Class module:
Public WithEvents PPTEvent As Application

Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation)
CreateShow
End Sub

i tried some stuff, but all of it is just guess, so i figured it'd be
faster
to just ask.

thanks
scott



  #3  
Old July 16th, 2008, 01:52 PM posted to microsoft.public.powerpoint
theintern
external usenet poster
 
Posts: 58
Default multiple event handlers

Seems like a neat tool, but i'm a little unsure how it may help me. can you
explain a bit more? thanks


"Austin Myers" wrote:

This should help:
http://skp.mvps.org/setview.htm


Austin Myers
Microsoft PowerPoint MVP Team

Creator of PFCPro, PFCMedia and PFCExpress
http://www.playsforcertain.com


"theintern" wrote in message
...
Does anyone know how to create multiple event handlers? I want to have
the
same event fire on two different events, PresentationOpen (as seen below)
and
SlideShowEnd. See code below.

Module 1:
Public cPPTObject As New EventClass

Sub Auto_Open()
'set an application reference to the event-enabled object
Set cPPTObject.PPTEvent = Application
End Sub

Module 2:
Sub CreateShow()
all the stuff i want it to do
End sub

Class module:
Public WithEvents PPTEvent As Application

Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation)
CreateShow
End Sub

i tried some stuff, but all of it is just guess, so i figured it'd be
faster
to just ask.

thanks
scott




  #4  
Old July 16th, 2008, 03:01 PM posted to microsoft.public.powerpoint
Shyam Pillai
external usenet poster
 
Posts: 622
Default multiple event handlers

Hi,
I think Austin meant to point to the 'EventHandler Demo' download on this
page http://skp.mvps.org/download.htm.

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm


"theintern" wrote in message
...
Seems like a neat tool, but i'm a little unsure how it may help me. can
you
explain a bit more? thanks


"Austin Myers" wrote:

This should help:
http://skp.mvps.org/setview.htm


Austin Myers
Microsoft PowerPoint MVP Team

Creator of PFCPro, PFCMedia and PFCExpress
http://www.playsforcertain.com


"theintern" wrote in message
...
Does anyone know how to create multiple event handlers? I want to have
the
same event fire on two different events, PresentationOpen (as seen
below)
and
SlideShowEnd. See code below.

Module 1:
Public cPPTObject As New EventClass

Sub Auto_Open()
'set an application reference to the event-enabled object
Set cPPTObject.PPTEvent = Application
End Sub

Module 2:
Sub CreateShow()
all the stuff i want it to do
End sub

Class module:
Public WithEvents PPTEvent As Application

Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation)
CreateShow
End Sub

i tried some stuff, but all of it is just guess, so i figured it'd be
faster
to just ask.

thanks
scott





  #5  
Old July 16th, 2008, 03:16 PM posted to microsoft.public.powerpoint
theintern
external usenet poster
 
Posts: 58
Default multiple event handlers

I've seen this demo, but am not really sure what that is supposed to be doing
for me either. it just opens a powerpoint, i click around, it says it's
running, nothing happens, and then i quit the program. what exactly am i
supposed to be getting from that? sorry, i must be missing something.

scott

"Shyam Pillai" wrote:

Hi,
I think Austin meant to point to the 'EventHandler Demo' download on this
page http://skp.mvps.org/download.htm.

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm


"theintern" wrote in message
...
Seems like a neat tool, but i'm a little unsure how it may help me. can
you
explain a bit more? thanks


"Austin Myers" wrote:

This should help:
http://skp.mvps.org/setview.htm


Austin Myers
Microsoft PowerPoint MVP Team

Creator of PFCPro, PFCMedia and PFCExpress
http://www.playsforcertain.com


"theintern" wrote in message
...
Does anyone know how to create multiple event handlers? I want to have
the
same event fire on two different events, PresentationOpen (as seen
below)
and
SlideShowEnd. See code below.

Module 1:
Public cPPTObject As New EventClass

Sub Auto_Open()
'set an application reference to the event-enabled object
Set cPPTObject.PPTEvent = Application
End Sub

Module 2:
Sub CreateShow()
all the stuff i want it to do
End sub

Class module:
Public WithEvents PPTEvent As Application

Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation)
CreateShow
End Sub

i tried some stuff, but all of it is just guess, so i figured it'd be
faster
to just ask.

thanks
scott






  #6  
Old July 16th, 2008, 05:14 PM posted to microsoft.public.powerpoint
Austin Myers
external usenet poster
 
Posts: 1,631
Default multiple event handlers

Oops, sorry. Pointed to the wrong link. :-)


"Shyam Pillai" wrote in message
...
Hi,
I think Austin meant to point to the 'EventHandler Demo' download on this
page http://skp.mvps.org/download.htm.

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm


"theintern" wrote in message
...
Seems like a neat tool, but i'm a little unsure how it may help me. can
you
explain a bit more? thanks


"Austin Myers" wrote:

This should help:
http://skp.mvps.org/setview.htm


Austin Myers
Microsoft PowerPoint MVP Team

Creator of PFCPro, PFCMedia and PFCExpress
http://www.playsforcertain.com


"theintern" wrote in message
...
Does anyone know how to create multiple event handlers? I want to
have
the
same event fire on two different events, PresentationOpen (as seen
below)
and
SlideShowEnd. See code below.

Module 1:
Public cPPTObject As New EventClass

Sub Auto_Open()
'set an application reference to the event-enabled object
Set cPPTObject.PPTEvent = Application
End Sub

Module 2:
Sub CreateShow()
all the stuff i want it to do
End sub

Class module:
Public WithEvents PPTEvent As Application

Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation)
CreateShow
End Sub

i tried some stuff, but all of it is just guess, so i figured it'd be
faster
to just ask.

thanks
scott







  #7  
Old July 16th, 2008, 05:22 PM posted to microsoft.public.powerpoint
Austin Myers
external usenet poster
 
Posts: 1,631
Default multiple event handlers

Events in PPT are different than the other office apps.

In other office apps the event trap is built in to the object model, in PPT
you must built your own trap as a Class Module. (It MUST be a Class
Module.) That is what Shyam has provided for you.

From that point the Event Trap must "Call" your code. Assume that you want
to put up a message box each time a slide starts. You would use the
NextSlide event in a Class Module and when its triggered by PowerPoint it
"Calls" your code to display the message box.


Austin Myers
Microsoft PowerPoint MVP Team

Creator of PFCPro, PFCMedia and PFCExpress
http://www.playsforcertain.com




"theintern" wrote in message
...
I've seen this demo, but am not really sure what that is supposed to be
doing
for me either. it just opens a powerpoint, i click around, it says it's
running, nothing happens, and then i quit the program. what exactly am i
supposed to be getting from that? sorry, i must be missing something.

scott

"Shyam Pillai" wrote:

Hi,
I think Austin meant to point to the 'EventHandler Demo' download on this
page http://skp.mvps.org/download.htm.

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm


"theintern" wrote in message
...
Seems like a neat tool, but i'm a little unsure how it may help me.
can
you
explain a bit more? thanks


"Austin Myers" wrote:

This should help:
http://skp.mvps.org/setview.htm


Austin Myers
Microsoft PowerPoint MVP Team

Creator of PFCPro, PFCMedia and PFCExpress
http://www.playsforcertain.com


"theintern" wrote in message
...
Does anyone know how to create multiple event handlers? I want to
have
the
same event fire on two different events, PresentationOpen (as seen
below)
and
SlideShowEnd. See code below.

Module 1:
Public cPPTObject As New EventClass

Sub Auto_Open()
'set an application reference to the event-enabled object
Set cPPTObject.PPTEvent = Application
End Sub

Module 2:
Sub CreateShow()
all the stuff i want it to do
End sub

Class module:
Public WithEvents PPTEvent As Application

Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation)
CreateShow
End Sub

i tried some stuff, but all of it is just guess, so i figured it'd
be
faster
to just ask.

thanks
scott








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.