Re: Run Macro during slide show



Hi John

thanks for your suggestion, I tried your script but it did not work so i
tried to combine bills code that does work with what i thought would change
the X but failed. here is the code I came up with but i get a compile erroe:
invalid or unqualified reference on the first .font.color=vbred

ActivePresentation.Slides(1).Shapes("AutoShape 7") _
.TextFrame.TextRange.Text = "X"
.Font.Color = vbRed
.Font.Size = 24
SlideShowWindows(1).View.GotoSlide 2
End Sub

many thanks

Glyn


"John Wilson" wrote:

Rather than specifying a specific shape I'd try this

Sub redx(oshp As Shape)
If oshp.HasTextFrame Then
With oshp.TextFrame.TextRange
.Text = "X"
.Font.Color = vbRed
.Font.Size = 24
End With
End If
SlideShowWindows(1).View.GotoSlide 2
End Sub
--
Did that answer the question / help?
___________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
email john AT technologytrish.co.uk


"Glyn Jones" wrote:

Hi Bill

Thanks very much this now seems to work. one other question is how would
you change the "X" to be larger and red in colour?

Thanks Glyn

"Bill Dilworth" wrote:

Hi Glyn,

This is the key aspect you seem to have missed. You can not select anything
in a slideshow, only while in edit view. Therefore, macros recorded in edit
view will not play in edit view if they rely on selections.

Instead of this (I assume you are trying to change the text in the shape to
"X")...
---------
ActiveWindow.Selection.SlideRange.Shapes("AutoShape 7").Select
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Select
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange _
.Characters(Start:=1, Length:=1).Select
ActiveWindow.Selection.TextRange.Text = "X"
ActiveWindow.View.GotoSlide Index:=2
End Sub
----------

Try this ....
---------
ActivePresentation.Slides(1).Shapes("AutoShape 7") _
.TextFrame.TextRange.Text = "X"
SlideShowWindows(1).View.GotoSlide 2
End Sub
---------

--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
..



"Glyn Jones" <Glyn Jones@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7BBBE276-6DC9-47B4-AB70-4B1815A19ED0@xxxxxxxxxxxxxxxx
Hi
I am having trouble assigning a macro to an action button to work during a
show. I have read a lot of the previous answers but I still can't get it
to
work.
I am running a small quiz where the front *** has ten buttons numbered 1
to 10, when you click on a button it takes you to a set slide with a
question
on, at the bottom of that page is another button that takes you back to
the
selection slide. What I am trying to do is when you press the numbered
button
a large X apears on the button to say that that button has been used. This
is
the macro that I have written and it works ok in edit mode but will not
work
in slide show format.

ActiveWindow.Selection.SlideRange.Shapes("AutoShape 7").Select
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Select

ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1,
Length:=1).Select
ActiveWindow.Selection.TextRange.Text = "X"
ActiveWindow.View.GotoSlide Index:=2
End Sub

Any help would be appriciated

Glyn



.