nivini
Programmer
- Mar 24, 2004
- 64
Hello all
I have this code
what I need to do is when a user press key 49(thats the '1') a presentation is showed, when the user press key 50 (thats the '2') the first presentation (pp1.ppt)is stopped and other presentation (pp2.ppt)is showed. and viceversa
But what happens is that after the first presentation is showed the keypress event is no longer available for me, since on the screen theres the presentation running.
How can i stop the running presentation and start run the other one with a keypress event??
Many thanks in advnce
Nivini
I have this code
Code:
Option Explicit
Option Base 1
Dim objPP As PowerPoint.Application
--------------------------------------
Private Sub Form_KeyPress(KeyAscii As Integer)
Set objPP = New PowerPoint.Application
Dim PP As PowerPoint.Presentation
Dim str As String
DoEvents
Set objPP = New PowerPoint.Application
objPP.Visible = True
Select Case KeyAscii
Case 49
str = "D:\PP\ppt1.ppt"
Case 50
str = "D:\PP\pp2.ppt"
End Select
Set PP = objPP.Presentations.Open(str, True)
With PP
.SlideShowSettings.Run
End With
End Sub
what I need to do is when a user press key 49(thats the '1') a presentation is showed, when the user press key 50 (thats the '2') the first presentation (pp1.ppt)is stopped and other presentation (pp2.ppt)is showed. and viceversa
But what happens is that after the first presentation is showed the keypress event is no longer available for me, since on the screen theres the presentation running.
How can i stop the running presentation and start run the other one with a keypress event??
Many thanks in advnce
Nivini