Help with VBA or Macro for triggering animation on Mouse Over

G

Guest

I already know this question has been asked many times before. And 99% of
the time the answer is to hyperlink between two slides to simulate an
animation. This is a neat solution, but does not work for my situation. I
am working on a presentation that includes a very complex Agenda right now...
but if I had the ability to trigger animations with a mouse over it would be
infinitely more comprehensible.

I have come accross a few alternative solutions on this board... where it
was suggested that some VBA Code or a Macro could be used to trigger
animations on Mouse Over.

UNFORTUNATELY the people who suggested such a solution never came back to
explain how the code or macro is written!! This is starting to sound like
the Holy Grail of PowerPoint (for me anyway, but I'm sure many others would
like to know too)

With this little trick I can improve the function and flow of many
presentations. I am having trouble believing that hyperlinking two slides to
simulate an animation is the only answer. Surely there is someone out there
who knows a thing or two about VBA and can write the necessary code?

Please... someone... help enlighten the community and spread this long
sought after knowledge!!

Thanks!!

art.
 
D

David M. Marcovitz

Here's a simple solution, but it seems more complicated than the two-
slide solution. Put three shapes on your slide and name them:

RegularShape
ClickedShape
ReturnToRegular

If you need help naming shapes, go to Example 8.7 on my site:

http://www.PowerfulPowerPoint.com/

We seem to be having some problems with the site this morning so you if
that link doesn't work, go to the alternative:

http://webdev.loyola.edu/dmarco/education/PowerfulPowerPoint/

Now, for the shape named oRegularShape link the Action Setting to:

Sub DoTheHighlightThing()
ActivePresentation.SlideShowWindow.View.Slide.Shapes _
("ClickedShape").Visible = True
End Sub

For the oReturnToRegular, make that mostly transparent and larger than
the other two shapes (just like the trick for hyperlinking to another
slide), and have it run the macro on mouse over:

Sub UndoTheHighlightThing()
ActivePresentation.SlideShowWindow.View.Slide.Shapes _
("ClickedShape").Visible = False
End Sub

The key here is to get your shapes positioned just right. The
oReturnToRegular shape should be behind the others and slightly larger.
The oRegularShape should be next in order, and the oClickedShape should
be on top and at least as big as the oRegularShape (otherwise we'll have
to hide the oRegularShape and that is more trouble than it is worth).

Finally, you will need something to trigger the oClickedShape to hide
before you get there. This can happen on some previous slide (I usually
have a Get Started button on the first slide that cleans up stuff like
this and moves on to the next slide):

Sub GetStarted()
ActivePresentation.Slides(#).Shapes("ClickedShape").Visible = False
ActivePresentation.SlideShowWindow.View.Next
End Sub

Where you replace # with the number of the slide where all the action is.

This doesn't actually trigger animations, but it has the effect you want.

--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/
 
G

Guest

David

Thanks for the reply. I followed your instructions several times but every
time I launched the presentation and tried hovering over the shapes, nothing
happened. I'm not very knowledgable about scripting.. all I know is that in
the VB editor, I inserted the cose you gave me into three separate modules...
if the modules is the right place to put the code, then I really don't know
what I did wrong.

I'm anxious to see how this works!! Do you have a working example that you
could email me?

arthur9 @ gmail .com
 
G

Guest

Thanks.. but I'm sure that would still be too confusing for someone trying it
the first time (and there are a lot of people who will edit the presentation
to their own needs once or twice...)

I'm thinking the only solutions is to make sure the botton 1/4 of the screen
does not include ANY text or objects on the regular slides. then the flyout
menu can come from the bottom, and it will flyout over top of all the shapes
 
G

Guest

David,

Sorry, ignore the second post below this one. I'm having trouble posting my
replies in the right place today! That was supposed to be a reply to a post
I made about flyout menus...

I'm still interested in a working example

art.
 
D

David M. Marcovitz

Unless you have a good reason to do it, never put code in separate
modules. Advanced programmers will have lots of good reasons for separate
modules. Novices will rarely have a good reason for separate modules.
Also, you need to have the all the code be set to the Mouse Over action
setting, not the On Click action setting.
--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/
 
D

David M. Marcovitz

OK. Since someone mentioned that this is "The Holy Grail," I guess I
better give you an example. There is now one on my site:

http://www.PowerfulPowerPoint.com/

It is under More Tricks, and it is Trick #10.

--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