PP VBA Q: Coding each object vs a generic "onclick" event?

K

Keith R

I'm helping a friend put together a powerpoint slide that will be
"interactive", set up like a jeopardy-style game board. Her desired state
is that when a number (200,400,600,etc) is clicked, a question will
"appear", then when the question is clicked, the cell will turn blank.

I figure the easiest way to do this is layer three objects, from front to
back- the amount, the question, and a blank square. Then any time any
object on the screen is clicked, send that object to back (using
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack or something
similar?).

The user may add/delete items even after I hand the presentation back, so
I'd like to code it so that the "structure" or grid can be on the slide
master, and my friend can put just the number and question objects (and the
blank squares) on the slide itself, and have the code run regardless of
which object is clicked or what that object's name is;

instead of a lot of code, one snippet for each object:
=======================================
Public WhichObject as Object

Sub ("WordArt 55")_click()
WhichObject = "WordArt 55"
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub

Sub ("WordArt 56")_click()
WhichObject = "WordArt 56"
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub

etc....

I'd like to have something that intercepts the general click event;
========================================
Sub AnyObjectClicked()
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub

Is that possible, and if so, how?

Many thanks,
Keith R
 

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