assign macro to action button

G

Guest

Am creating an activity for training:
Colored grid 5x3 rectangles covering the entire page with a subject and
action button in the center of each grid on slide 1. Action button takes you
to a specific slide. -- works fine.

On individual slide, is a question and two answer buttons. One action
button is for a correct response, plays sound (applause) and returns to slide
1. Second action button for incorrect answer, plays soudn and returns to
slide 1. -- works fine

Problem:
I am trying to assign a Macro to delete/clear the grid containing selected
objects from a presentation when clicked. I can build the macro using the
standard recording function and it works fine from the Macro menu.

Start recording -- hold down control key select objects, push delete ---
stop recording. I can successfully run the macro from the Macro menu.

I add an action button, and assign the macro in the properties.

Macro will not run.

What am I missing?

Thanks
 
D

David M. Marcovitz

When you record a macro, it usually does a lot of things with selecting
objects. In Slide Show view, you cannot select objects, so many recorded
macros don't work. If you really want to delete objects, then you will
need to identify the objects you want to delete (probably by name or
number):

ActivePresentation.Slides(2).Shapes(3).Delete

will delete the 3rd shape on the second slide.

However, you might want to hide and show objects:

ActivePresentation.Slides(2).Shapes(3).Visible = msoFalse

hides an object without deleting it (change it to msoTrue to show it
again).

You might want to see some examples of hiding and showing objects on my
site:

http://www.PowerfulPowerPoint.com/

Look for Example 6.6 (that is the simplest hiding/showing example on my
site). Go to "Examples by Chapter" and "Chapter 6."

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 

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