Deleting an object during the slide show

T

tkcollette

I am trying to create a game in PPT where I have rectanlge boxes over
the specific locations on the slide. Rather than have them fade out
when I mouse click, I want to be able to creat a macro and connect to
the object so that what ever rectangle box I click on, that rectanlge
box will be deleted, revealing the hidden information that was behind
it. I will not know the order in which I want to reveal (delete the
rectangle box) as it depends on the answer I get.

I tried the line below but it did not work.... Any help would be
greatly appreciated.

ActivePresentation.Slides(1).Shapes(3).Delete
 
T

Troy @ TLC

Using PPT 2002-2003 you want to experiment with TRIGGERS. A good suggestion
would be search google for "powerpoint jeparody" a number of free downloads
should be found that make good use of triggers.
 
G

Guest

If your vba isn't too good then as Troy says triggers should do it for you.

If you just want to learn / practice vba then the code to use to remove a
shape would be

Sub takeitaway(oshp As Shape)
oshp.Visible = msoFalse
End Sub

(Give each shape an action of run macro - takeitaway)

You will also need to run this at some stage to make all the shapes visible
again (otherwise you'll never see them again)!

Sub bringthemback()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Visible = msoFalse Then oshp.Visible = msoTrue
Next oshp
Next osld
End Sub
--

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
 
T

tkcollette

Troy said:
Using PPT 2002-2003 you want to experiment with TRIGGERS. A good suggestion
would be search google for "powerpoint jeparody" a number of free downloads
should be found that make good use of triggers.

--
Troy Chollar
TLC Creative Services, Inc.
troy at tlccreative dot com
www.tlccreative.com

Thanks a ton - I'm a teacher and that is exactly what I needed.
 
T

tkcollette

John said:
If your vba isn't too good then as Troy says triggers should do it for you.

If you just want to learn / practice vba then the code to use to remove a
shape would be

Sub takeitaway(oshp As Shape)
oshp.Visible = msoFalse
End Sub

(Give each shape an action of run macro - takeitaway)

You will also need to run this at some stage to make all the shapes visible
again (otherwise you'll never see them again)!

Sub bringthemback()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Visible = msoFalse Then oshp.Visible = msoTrue
Next oshp
Next osld
End Sub
--

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
Thank you John, This worked and along with Triggers I have my problems
solved. Much appreciated. TKC.
 

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