Macros in powerpoint 2K

A

AikoNeko_chan

Ok... now I know you guys deal with this all the time but I would like
some help. Here's the deal. I have recorded a macro in my powerpoint
presentation to bring a picture to the foreground. I have set it to a
text box to "run on Mouse Click". Nothing happens in Presentation mode
and I knew it wouldn't because you cannot rely on selection in
presentation mode, but I don't know how to modify the VBS script to
make it work...I would appreciate some help from anyone...Thanks...

BTW this is my macro script...

Sub Right()
'
' Macro recorded 10/19/2005 by ...
'

ActiveWindow.Selection.ShapeRange.ZOrder msoBringToFront
End Sub
 
D

David M. Marcovitz

What you want to do is much clearer in Edit View than in Slide Show
(Presentation) View because you can click on the picture to select it and
then run the macro in Edit View. In Slide Show View do you want to click
on the picture and have the macro run or do you want to click on
something else to have the macro run? If you want to click on the
picture, you want:

Sub Right(thePic As Shape)
thePic.ZOrder msoBringToFront
End Sub

Assign this procedure to the shape.

If you want to click on something else, you will have the difficulty of
not knowing which object you want to bring to the front. If the code
above doesn't work for you, let us know, and we might be able to provide
some other code.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

(e-mail address removed) wrote in @g49g2000cwa.googlegroups.com:
 
M

Me

what I want to do is click on a text box that I have as part of my last
two slides that are in the form of a test per say. so I want to be able
to click on one portion of text and have it display a checkmark to show
that my fellow classmates remembered the information in my
presentation...if that helps...
 
M

Me

I tried the code that you gave me and all I get is a Compile Error... I
know nothing about VBS but I'm guessing that a Compile Error is a bad
thing? The actual error message that I recieve is:

Compile Error:
Syntax Error


HELP!!!??? :*(
 
D

David M. Marcovitz

Are you using Visual Basic or Visual Basic for Applications (VBA)? I
assumed that when you said you were recording a macro, you were using VBA,
but you keep mentioning VBS. In VBA, the code I included in my previous
message works fine. In Visual Basic (which I don't use), you'll need some
hooks to PowerPoint.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
D

David M. Marcovitz

Yes, VBA is the one you access from within PowerPoint.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
M

Me

I want to be able to click on a piece of text and have a checkmark
picture appear "on MouseClick". Like I click on the text "hi" in a text
box on the slide and a checkmark appears.
 
D

David M. Marcovitz

Because you are using PowerPoint 2000, you will either have to use macros
or fake it with multiple slides (works nicely if you just want one check
mark, but is a real pain if you want more on the same slide).

The easiest thing to do is to create check marks as graphics and hide and
show them with VBA. You can find similar examples at my Web site:

http://www.PowerfulPowerPoint.com/

Click on "Examples by Chapter" and look at Example 6.6 for the simplest
use of the .Visible property (that allows you to hide and show objects).
Also Example 7.10 does some neat things with hiding and showing. Neither
example is exactly what you want, but they should get you started.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 

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