VBA to Simulate Mouse Click

J

John Michl

Having difficulty figuring out some animation things posted a week ago.


Is there a way to programmatically simulate a mouse click on a shape?
I have a shape that triggers an automation sequence. I'd like VBA to
kick it off by doing something like "Click on shape 1".

If not, can VBA be used in PPT2003 to run animation exit and emphasis
effects? In examples I've found, it appears Timeline can be used to
Add the effects but I need some way to actually run the animation.

Thanks - John
 
J

John Michl

I want to accept input from the user (an integer from 0 to 9) and based
on that integer run some animation on the screen. I've been able to
collect the digit and display a message box during the slide show but
instead of a message box, I want some shapes to exit and others to
appear.

More detail...there are five answer boxes displayed on the screen.
Click on a box and answer shows. Click outside the boxes and a red X
appears. It is obvious to the class which box will be clicked because
they can see the mouse movement. I've been able to set an input box to
"display" off screen so if I could somehow attach the animation
sequence to that I'd be all set. I already have the "trigger"
animation set to the boxes so if I could simulate a mouse click, it be
done.

- John
 
D

David M. Marcovitz

What about the .Visible property? It won't have all the fancy animation
effects, but you can hide or show the Red X with .Visible = True or
..Visible = False.
--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.loyola.edu/education/PowerfulPowerPoint/
 
J

John Michl

Thanks, Glenna

Do recall a specific example on the site that simulates a mouse click
or kicks off an animation sequence with VBA? The site looks full of
examples so it would help to know where to focus my search.

Thanks,
John
 
J

John Michl

Thanks for the suggestion.

Currently, each trigger sets off three or four animations (things
appearing and dissappearing, sounds going off, etc.) It really adds to
the "game show" effect of the training. Ideally, I'd access the
animation sequences already in the model.

If it can't be done programmatically, I'd probably just stick with the
mouse clicks I have now. Only problem is that participants can see
where I place the mouse before I click so it doesn't take long for them
to catch on.

- John
 
D

David M. Marcovitz

OK. Two things to keep in mind:

(1) You can have VBA do three or four things (such as bring in an a
shape, have another shape go away, and play a sound) with one mouse
click.

(2) Just because I don't know how to trigger an animation sequence with
VBA, doesn't mean it can't be done. Lots of greater VBA minds are here in
this group. Hopefully, one of them will chime in.

--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.loyola.edu/education/PowerfulPowerPoint/
 

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