Macros do not work as object actions

  • Thread starter Thread starter Damianos
  • Start date Start date
D

Damianos

Hi,

I recorded some macros and running them with Alt-F8 works
fine.

But if I want to bind a macro to an object as an action
when I click it, the macro is not started. I've tried all
security levels but it does not even enter the macro.

Any hint?
Thanks, Damianos
 
Are you clicking on it during Slide Show mode instead of Edit mode? Are the
actions something that can be done in Slide Show mode? If not, that will be
the problem.

HTH,
Glenna
 
Link to FAQ:
**Macros I record in Normal/Slide view don't work in Slide Show
http://www.rdpslides.com/pptfaq/FAQ00159.htm

--
Bill Dilworth, Microsoft PPT MVP
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of our questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..
 
This FAQ does work, assuming you can code http://www.rdpslides.com/pptfaq/FAQ00159.ht
I was stumped with this. I am trying to create a Blockbusters (Quiz game in UK - probably from the US originally) type hexagon grid. Where I want to change the colour of a hexagon if I click on it
The following code is pretty close to what I want to do - but its a real pain because I think I have to recreate this piece of code for each hexagon. I would much rather be able to identify the object on which I clicked and pass this as a parameter to a colour changing routine

Sub toggle_shape4(
' I know it is autoshape 4 because I used some code off the FAQ to identify the objec
With SlideShowWindows(1).Presentation.Slides(1).Shapes("Autoshape 4"
If .Fill.ForeColor.RGB = RGB(255, 255, 102) The
.Fill.ForeColor.RGB = RGB(100, 100, 102
Els
.Fill.ForeColor.RGB = RGB(255, 255, 102
End I
.Fill.Soli
End Wit

End Su

My thanks to www.rdpslides.com
 
Or you could modify it to...

Sub ToggleColor (oShp as Shape)
With oShp.Fill
If .ForeColor.RGB = RGB(255, 255, 102) Then
.ForeColor.RGB = RGB(100, 100, 102)
Else
.ForeColor.RGB = RGB(255, 255, 102)
End If
.Solid
End With

Any shape that you assign the Toggle color Macro to, will change when
clicked.



--
Bill Dilworth, Microsoft PPT MVP
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of our questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..

Jim Grady in Oldham said:
This FAQ does work, assuming you can code http://www.rdpslides.com/pptfaq/FAQ00159.htm
I was stumped with this. I am trying to create a Blockbusters (Quiz game
in UK - probably from the US originally) type hexagon grid. Where I want to
change the colour of a hexagon if I click on it.
The following code is pretty close to what I want to do - but its a real
pain because I think I have to recreate this piece of code for each hexagon.
I would much rather be able to identify the object on which I clicked and
pass this as a parameter to a colour changing routine.
 
The problem is probably that the macro that was recorded in Edit (or Normal) View, and you are trying to run it in Slide Show View by assigning an action to an object. This often won't work. For example, if you record a macro to move an shape on your slide, the macro will first select the shape and then move the selected shape. Unfortunately, you can't select a shape in Slide Show View. If you know some VBA, you might be able to edit the recorded macro to work in Slide Show View, but if you don't know any VBA, this is very complicated
--Davi

David M. Marcovitz, Ph.D
Loyola College in Marylan
Author of _Powerful PowerPoint for Educators

----- Damianos wrote: ----

Hi

I recorded some macros and running them with Alt-F8 works
fine

But if I want to bind a macro to an object as an action
when I click it, the macro is not started. I've tried all
security levels but it does not even enter the macro

Any hint
Thanks, Damianos
 
Back
Top