Show/Hide Slides in Powerpoint using VBA

G

Guest

Hi,

I am a IT trainer who trains candidates on bespoke software. No 2 training
courses are ever the same and as such, I seem to be spending more and more
time, cutting and pasting multiple slideshows into one. I have been told that
it is possible to have a selection form that could be run at the start of the
slideshow, which contains a checkbox for each of the modules. I was hoping
that with a bit of simple code I would be able to filter which slides are
shown (maybe with a collection of IF Statements?)

e.g.

Using the Click/Update procedure of a form object

if CHKSoftwareA is 0 then (Show slides 1-15)
else
Show slides 16-30
end if

I have worked out how to test whether or not a checkbox is checked

So now I presume I need the following things

1. Code to show/hide one (or multiple slides)
2. A go button, that will then apply the changes and launch the slideshow.

I have done much research and it seems as though most people suggest to go
with a CustomSlideShow, however this could still prove to be a time consuming
exercise, which is why I have decided to give the VBA option a try. I have
also noticed that this question has been raised on a number of occasions, so
I presume this would benefit many people in a similar position to myself

I would appreciate it if someone could give me a few pointers on this

Here's hoping

Richard
 
G

Guest

Here's some code which would hide slides 1 - 6. To unhide you would just need
to use .Hidden = msofalse. Hope that helps you on your way. The very basic
error handler just jumps you out of the code if eg there aren't six slides.

Sub hideme()
Dim x As Integer
On Error GoTo errhandler
For x = 1 To 6
ActivePresentation.Slides(x).SlideShowTransition.Hidden = msoTrue
Next x
Exit Sub
errhandler:
End Sub
 
S

Steve Rindsberg

I am a IT trainer who trains candidates on bespoke software. No 2 training
courses are ever the same and as such, I seem to be spending more and more
time, cutting and pasting multiple slideshows into one. I have been told that
it is possible to have a selection form that could be run at the start of the
slideshow, which contains a checkbox for each of the modules. I was hoping
that with a bit of simple code I would be able to filter which slides are
shown (maybe with a collection of IF Statements?)

In addition to the code approach, there are programs that act as libraries for
your slides/presentations and allow you to build new presentations out of
slides/groups of slides you select.

Google SlideWhere for one example.

For another very different but interesting approach, have a look at Robert
Lane's ideas about Relational Presentations. He's published a book on the
topic, and has a web site:

http://www.aspirecommunications.com

It seems to be down or running very slowly at the moment but it eventually comes
up.

Geetesh Bajaj has an article about Robert and his methods here in case you need
a little light reading while waiting for aspire to come back to life:

http://www.indezine.com/articles/relationalpresentations.html
 

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

Top