Supercharge your PowerPoint productivity with
|
PPTools |
Visit MVP Shyam Pillai's site for example code that shows you how to determine programmatically which shape was clicked. Note that you can modify the code to get a reference to the slide the shape is on: oShp.Parent returns a reference to the slide the shape is on Here's an example:
Sub ToggleVisibility(oShape As Shape)
oShape.Visible = Not oShape.Visible
End Sub
Rightclick a shape in PowerPoint, choose Action Settings, Run Macro and pick ToggleVisibility to assign this macro to the shape's Click event. Then when you run the slide show and click the shape, it'll become invisible. You could modify the code to make some other shape visible or invisible instead. For example if you have a shape on Slide 1 named "Popup" , assign this macro to its MouseOver Action and it'll appear/disappear as you wave the mouse over it during a screen show:
Sub PopUp(oShape As Shape)
ActivePresentation.Slides(1).Shapes("Popup").Visible = _
Not ActivePresentation.Slides(1).Shapes("Popup").Visible
End Sub
See How do I use VBA code in PowerPoint? to learn how to use this example code.
Español Deutsch Français Português Italiano Nederlands Greek Japanese Korean Chinese |
Supercharge your PPT Productivity with PPTools
|
content authoring & site maintenance by |
Determine which shape was clicked
http://www.pptfaq.com/FAQ00141.htm
Last update 09 September, 2006