Change color of a shape temporarily

P

Patrick

Hello there -- I am wondering if it is possible to temporarily change the
color of a shape on a slide. Let me explain:

I have 4 shapes on a slide. When the presentation is displayed in slideshow
view, the presenter will click one of the shapes - we do not know which - and
that shape should change color (same color for all, regardless of which is
clicked). Looking through the forums, I found some code that does this...

Sub colorShape(oSh As Shape)
With oSh
.Fill.Visible = msoTrue
.Fill.ForeColor.RGB = RGB(255, 153, 51)
.Fill.Solid
End With
End Sub

Works fine, as it turns out. Problem is I do not want the shape to have this
new color when slideshow is exited. So looking for a way to change the color
in slideshow, but when we return to slide view, have the color back to its
original. Is this possible?

Thanks in advance!
 
D

David Marcovitz

Hello there -- I am wondering if it is possible to temporarily change the
color of a shape on a slide. Let me explain:

I have 4 shapes on a slide. When the presentation is displayed in slideshow
view, the presenter will click one of the shapes - we do not know which - and
that shape should change color (same color for all, regardless of which is
clicked). Looking through the forums, I found some code that does this...

Sub colorShape(oSh As Shape)
With oSh
.Fill.Visible = msoTrue
.Fill.ForeColor.RGB = RGB(255, 153, 51)
.Fill.Solid
End With
End Sub

Works fine, as it turns out. Problem is I do not want the shape to have this
new color when slideshow is exited. So looking for a way to change the color
in slideshow, but when we return to slide view, have the color back to its
original. Is this possible?

Thanks in advance!

Well, you don't need to use code to do this. You can use a trigger
animation. Set the object to be triggered by a click on itself. Look for the
option to change colors as an Emphasis effect.

If you want to use VBA, you will need to figure out something to trigger the
return to the original color. What I generally do is have my opening slide
contain a button that runs code to reset everything in the presentation the
way I want it (I do a lot with hiding and showing shapes, but I also do this
for changing colors). This won't return it to the color when you exit, but
it will return it to the color when you run the slide show again.

You'll need a pointer to the shapes, such as:

ActivePresentation.Slides(22).Shapes(4)

That points to the fourth shape on the 22nd slide. This will work (if you
get the numbers right), but you might be even better off naming the shapes
(and perhaps the slides) and using shape names instead of numbers.

--David
--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
P

Patrick

Thank you very much David! I went the trigger route -- I continually forget
that method -- and it is working like a charm. Thanks for your time and help!
 

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