Unanswered: Any VBA for Powerpoint experts out there?
I know that this is not an Access question but someone here can probaly answer this VBA question. When you run a slide show in PP you can change slides by pressing the enter key. However, I have two command buttons on the first slide and I want to force the user to use one of these buttons to navigate the show. How can I disable the keyboard interaction in VBA or ????
Not my area of competence, but a quick look and I came up with an idea or two:
1) Make your first slide a seperate slide show set to loop continuously (in the Set Up Show menu) and use code similar to the following to launch the second slide show (the rest of your show) in your command buttons:
.RangeType = ppShowNamedSlideShow
.SlideShowName = "Other Show"
2) Try to setup the Class module to utilize the Slide events.
In the Code Window for VBA, open help and lookup "Using Events with the Application Object" this gets you in the game. It tells you how to setup a Class module and initialize it for Application objects and events.
I fiddled around briefly by inserting a blank slide as the second slide and included the following code in the Class module:
Public WithEvents App As Application
Private Sub App_SlideShowNextSlide(ByVal Wn As SlideShowWindow)
Dim iC As Integer
iC = Wn.View.CurrentShowPosition
If iC = 2 Then SlideShowWindows(1).View.GotoSlide 1
Unlike the example, I called my class object Class1
Then, I put a couple command buttons on slide 1 and inserted the following code behind slide 1:
Dim X As New Class1
Set X.App = Application
Private Sub cmdAdvance_Click()
Private Sub cmdInitialize_Click()
It's crude, but it works and you may well find a way to improve upon it. When Enter is pressed, slide 2 is called and the before change is triggered. The event changes the show back to slide 1. It's causes a flicker on the screen, probably because my slide 2 was blank but slide 1 was not. Perhaps if slide 2 is identical in layout to slide 1, the flicker is less.
A more ideal solution is to cancel the slide change event, but I didn't see that option in my brief glance through the help system.
I got all this from the help system, by the way, so you should consider that as a good source as well.