heliraptor
01-02-2014, 09:02 AM
Hi all,
I'm using Powerpoint 2010 and have set up two seperate presentations.
One is being used daily as a briefing tool The second seperately as a training tool.
The latter for training is setup is used to generate aircraft emergency captions. It has a main front end slide (splash screen) with two areas (drawn on as buttons) where you can select a random emergency or a specific emergency to discuss. The 'specific' slides are access by right clicking on the button and simply selecting the slide you want from the list. The random button slide powerpoint is generated by simple VBA code shown below.
Sub JumpToRandomSlide()
Dim SldRng As Integer
Dim SldStart As Integer
'Number of slides in the range
SldRng = 20
'First slide in that range
SldStart = 20
'Do It
SlideShowWindows(1).View.GotoSlide _
Int(Rnd() * SldRng) + SldStart
End Sub
This works perfectly in isolation when opened up normally and is ideal for our requirements. Each time the radnom button is pressed a different emergency slide is displayed...perfect !
Occasionally we access the emergency presentation from the standard briefing presentation. It is accessed using an action button that hyperlinks directly to the emergency presentation. The main splash screen opens up where the random button is displayed as you would expect, if you click on it it will not run the 'random' macro and the same slide is presented time after time.
I have searched high and low for answers and come up with nothing. I have treid copying the VBA code to the briefing powerpoint as well which has had no effect.
I must admit I'm new to coding and there may be something simple I'm missing out on. I've tried it on differenet machines but I keep getting the same result.
If you have any advice or things to try I'd appreciate it.
Thanks
Lee
I'm using Powerpoint 2010 and have set up two seperate presentations.
One is being used daily as a briefing tool The second seperately as a training tool.
The latter for training is setup is used to generate aircraft emergency captions. It has a main front end slide (splash screen) with two areas (drawn on as buttons) where you can select a random emergency or a specific emergency to discuss. The 'specific' slides are access by right clicking on the button and simply selecting the slide you want from the list. The random button slide powerpoint is generated by simple VBA code shown below.
Sub JumpToRandomSlide()
Dim SldRng As Integer
Dim SldStart As Integer
'Number of slides in the range
SldRng = 20
'First slide in that range
SldStart = 20
'Do It
SlideShowWindows(1).View.GotoSlide _
Int(Rnd() * SldRng) + SldStart
End Sub
This works perfectly in isolation when opened up normally and is ideal for our requirements. Each time the radnom button is pressed a different emergency slide is displayed...perfect !
Occasionally we access the emergency presentation from the standard briefing presentation. It is accessed using an action button that hyperlinks directly to the emergency presentation. The main splash screen opens up where the random button is displayed as you would expect, if you click on it it will not run the 'random' macro and the same slide is presented time after time.
I have searched high and low for answers and come up with nothing. I have treid copying the VBA code to the briefing powerpoint as well which has had no effect.
I must admit I'm new to coding and there may be something simple I'm missing out on. I've tried it on differenet machines but I keep getting the same result.
If you have any advice or things to try I'd appreciate it.
Thanks
Lee