Running Macros in Presentation

  • Thread starter Thread starter Maggiekate
  • Start date Start date
M

Maggiekate

I have created a macro to delete a text box and it works - I have set action
settings for it to take place on click - but it will not work when viewing
the slide show. Does anyone know if it is possible to get this to happen.
 
Sorry I forgot to say I am using PowerPoint2003. Basically what I am trying
to do is have a picture as a background of a slide..........covered with a
range of text boxes that when one is selected the macro will run and delete
that box revealing part of the picture underneath.
 
You might find this much easier to do with triggered animations for the
boxes instead of writing a macro to do it. To do the triggers, select the
boxes and add an exit animation to them. Then, select each animation, right
click it, select Timing. From the timing dialog, you can set the animation
to be triggered by a click of itself. (If you want to save yourself even
more effort, create one box with the triggered animation and then copy and
paste it to make all the rest of the covering shapes.)

--
Kathy Jacobs, Microsoft MVP OneNote and PowerPoint
Author of Kathy Jacobs on PowerPoint
Get PowerPoint and OneNote information at www.onppt.com

I believe life is meant to be lived. But:
if we live without making a difference, it makes no difference that we lived
 
As Kathy says this is probably much easier with triggers. We have several
tutorials on this here:
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html#triggers

As to the code, when you say you created it do you mean recorded it? If so
the macro recorder rarely gives good code and in this case has probably
recorded code (including .selection?) that will only work in edit view.

code that works in slide show view:

Sub zapme(oshp As Shape)
oshp.Visible = False
End Sub

To get the shapes back

Sub allacomeback()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Visible = False Then oshp.Visible = True
Next oshp
Next osld
End Sub

Triggers will definitely be easier though

John

--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
 
Back
Top