presentation helper

Go Back   Presentation Helper > Presentation Helper Forum > PowerPoint Questions and Answers

Reply
 
22-11-07
Junior Member
 
Join Date: 2007
Posts: 1
Macros won't run in Action Settings On Mouse Click Mode

Hello all,

I'm trying to get a text box to change color when that particular text is clicked on in Slide Show mode. I recorded a macro where I selected the text box, then changed the color. Then I added the macro in "Action Settings" on the text box and clicked for the macro to run on mouse click, but it won't work. The macro will run if I go into the macro menu and hit "run" but it won't do it on mouse click in slide show mode. Any solutions?

Here's the VBA script from my recorded macro:

Sub grey()
'
' Macro recorded 11/22/2007 by JB
'

ActiveWindow.Selection.SlideRange.Shapes("Rectangl e 26").Select
ActiveWindow.Selection.ShapeRange.TextFrame.TextRa nge.Select
ActiveWindow.Selection.TextRange.Font.Color.Scheme Color = ppShadow
End Sub
 
24-11-07
Presentation Expert
 
Join Date: 2006
Posts: 232

Hi Jess

First of all the macro recorder rarely produces useable code! This is a typical example. You can't have a selection in slide show mode and so the code will never run.

Here's some code to try: (255,0,0) is red change to suit



Sub changeme()
ActivePresentation.SlideShowWindow.View.Slide.Shap es _
("Rectangle 26").Fill.ForeColor.RGB = RGB(255, 0, 0)
End

An alternative to change the shape THAT IS CLICKED in slide show mode


Sub changeme2(oshp As Shape)
oshp.Fill.ForeColor.RGB = RGB(255, 0, 0)
End Sub
__________________
John Wilson
Microsoft PowerPoint MVP
PowerPoint Alchemy - Amazing free tutorials!
 
16-12-08
Unregistered
Guest
 
Posts: n/a
Good hint ... but it does't work everytime

Hi all,

I'd like to expand the size of the shape I click onto during a presentation, make this change last for 30 seconds and then change it again to its original size. I've tried to apply your second code (using oshp as shape) but it does not work with the scaleheight/widht method (while it does with the fill.forecolor method).
Anybody knows why this weird pwrpoint behaviour?

Thanks,
gianluca
 
17-12-08
Presentation Expert
 
Join Date: 2006
Posts: 232

Because .ScaleHeight applies to Images and OLEobjects NOT shapes maybe!

Try

With oshp
.LockAspectRatio=msoTrue
.Height=.Height*1.5
End With
__________________
John Wilson
Microsoft PowerPoint MVP
PowerPoint Alchemy - Amazing free tutorials!
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies
One mouse click vs 2 mouse clicks dshore108 PowerPoint Questions and Answers 2
stop the presentation from moving forward with a click of the mouse simmo PowerPoint Questions and Answers 1