That is, click on one "button" to display the object. Click on another "button" to hide the object.
I'm pretty sure that this can be done with some fairly simple VBA code stored as macros, then assigning an Action Setting to the "show" and "hide" imgs to run the macros.
Unfortunately, I know virtually nothing about VBA and don't even know where to start. I don't have enough time right now to start with a VBA for Dummies kind of thing and just plug away until I get it figured out...
Can someone please suggest how I could approach this?
Alternatively, is there some way I could use standard JavaScript in a PPT 2000 presentation to accomplish this? (I do know a little JS, but can't figure out how to apply it to a PPT show...)
Thanks much,
LM
Example snippet to hide the object is:
ActivePresentation.Slides(2).Shapes("QuizButton").Visible = False
Similarly, the code to show it just changes the "False" to "True".
Keep in mind that the button will be visible initially unless you have a
"Start" button to run some code off of to hide certain objects (which is
what I do).
To create the macro, open your presentation, press ALT-F11 (to open the
Visual Basic Editor). Click the "Insert" menu and select "Module". You
will have a window appear on the right. Start typing the following, "Sub
HideIt()", then press ENTER. The "End Sub" will appear. Now all you need
is to enter a similar code from above. Keep in mind that you must have the
right slide number and object name. Naming objects is a little trickier.
The easiest way is to download a little add-in made by one of the PPT MVP's.
The site address is: http://www.rdpslides.com/pptools/index.html.
Once the code is completed, close out the VBA window, assign the macros to a
button, save your presentation, and away you go. I hope to have a sample of
my CBT presentation on my web site soon.
Hope this helps.
Bill Foley
www.pttinc.com
"Lisa McLain" <top...@mindspring.com> wrote in message
news:3D4666AD...@mindspring.com...
I'll give it a whirl (and may impose again, asking for additional clarification if I run into a serious road block.)
I truly appreciate your taking your time and sharing your knowledge!
LM
"PTT, Inc." wrote:
--
Lisa A. McLain
(life is) too short to be too serious
(in CA)
25206 Miles Avenue
Lake Forest, CA 92630
Voice: 949-588-0354
Fax: 949-588-0453
(in the Rockies)
221 Wayward Wind
Divide, CO 80814
Voice: 719-687-6839
Fax: 719-686-0855
(in PA)
21443 Route 66
Shippenville, PA 16254
Voice: 814-226-9226
Fax: 814-223-9385
Or you could do one macro to do both:
Sub ToggleThatSucker()
Dim Sh as Shape
Set Sh = ActivePresentation.Slides(2).Shapes("QuizButton")
Sh.Visible = Not Sh.Visible
End Sub
Can I apply this technique to an object on a slide master page? Or, alternatively, to all slides in a presentation?
Can I substitute another value for a specific slide number in "ActivePresentation.Slides(2)" where (2) represents the slide number? If so, what would be the convention for a slide master, all slides, or a range of slides?
And is there some reference material I should be looking at instead of bothering you kind souls?
Thanks much!
LM
Steve Rindsberg wrote:
--
Yup.
With ActivePresentation.SlideMaster.Shapes("YourShapeName")
.Visible = Not .Visible
End With
>>Or, alternatively, to all slides in a presentation?
Sub HideThemOnEverySlide()
' Assuming there's a shape on every slide named "Thing"
' Hide it
Dim X as Long
' Don't stop with an error msg if there's no shape named "Thing"
On Error Resume Next
For X = 1 to ActivePresentation.Slides.Count
With ActivePresentation.Slides(X).Shapes("Thing")
.Visible = Not .Visible
End With
Next X
End Sub
>
> Can I substitute another value for a specific slide number in
"ActivePresentation.Slides(2)" where (2) represents the slide number?
You bet. Gotta make sure that the slide number exists, though or it goes
boom.
>>If so, what would be the convention for a slide master, all slides, or a
range of slides?
See above for slide master and all slides.
For a range of slides, do this instead of what's above:
For X = 13 to 42 ' to do slides 13 through 42
> And is there some reference material I should be looking at instead of
bothering you kind souls?
Look through the VBA programming stuff at www.pptfaq.com and follow the
links to other useful sites.
Especially look for the links to Shyam Pillai's site ( www.mvps.org/skp ...
to go there directly) and Chirag Dalal's site. Lots of good material there.
But don't be shy about asking here either. You've already got the drill
down pat: ask simple, specific questions that help you build the bits you
need rather than general questions that'd take a book and days to answer.
Nobody will write whole programs for you, but plenty of folks here will help
you write the building blocks that fit together INTO a program.
Sure do appreciate all your patience, assistance, and expertise!
LM
No prob. I still remember how frustrating it was trying to figure all this
stuff out at first.
And still is every time I have to figure something new out. <g>