code not working when ControlToolbox used?

G

Geoff Cox

Hello,

I have code below which works fine and adds a next/forward action
button to each slide except the last one.

But!

If I add a text box (for user entry of text) using the Control Toolbox
(on the tool bar) and insert a textbox, making EnterKeyBehaviour true,
the code will no longer add the action buttons!

Why is this?

Cheers

Geoff

Dim oPresentation As Presentation
Set oPresentation = Presentations.Open(strMyFile)
Dim SldNum As Integer
Dim oSh As Shape
Dim Sld As Slide

For SldNum = 1 To .Slides.Count - 1

Set oSh = oPresentation.Slides(SldNum).Shapes.AddShape
_(msoShapeActionButtonForwardorNext, 586.75, 496.75, 96.38, 28.38)

With oSh.ActionSettings(ppMouseClick)
..Action = ppActionNextSlide

With oSh.TextFrame.TextRange
.Text = "next"
With .Font
.Name = "Arial"
.Size = 18
.Bold = msoFalse
.Italic = msoFalse
.Underline = msoFalse
.Shadow = msoFalse
.Emboss = msoFalse
.BaselineOffset = 0
.AutoRotateNumbers = msoFalse
.Color.SchemeColor = ppForeground
End With
End With

End With

Next
 
G

Geoff Cox

On Sun, 29 Oct 2006 08:45:28 +0000, Geoff Cox

Am I right in thinking that if you add a textbox using the Control
Toolbox - the resulting presentation will not work with PPT 2003
Viewer?

Thanks

Geoff
 
G

Guest

Depends what you mean. I believe it would run showing any pre entered text
but you would be unable to use it to enter text during a presentation!! I
guess that's NO really!

No vba will work with the viewer
--

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
 
G

Geoff Cox

Depends what you mean. I believe it would run showing any pre entered text
but you would be unable to use it to enter text during a presentation!! I
guess that's NO really!

No vba will work with the viewer

John,


Yes - the idea was to for the user to enter text. I thought this was
too good to be true for the Viewer!

How do you get to see the code behind the textbox?

Thanks

Geoff
 
S

Steve Rindsberg

There's more to the code, I assume ... (strMyFile gets a value somehow, for
example).

Is error handling on or off? If off, turn it on (delete any "On error resume
next" lines). Where does the code fail? What happens when you step through it
a line at a time?
 
G

Geoff Cox

There's more to the code, I assume ... (strMyFile gets a value somehow, for
example).

Steve,

yes - it comes from the code which opens files in folder and
sub-folders.
Is error handling on or off? If off, turn it on (delete any "On error resume
next" lines). Where does the code fail? What happens when you step through it
a line at a time?

the code now works! I have made other changes but perhaps I corrected
some mistake in doing so. Sorry to have bothered you.

Thanks,

Geoff
 
S

Steve Rindsberg

the code now works! I have made other changes but perhaps I corrected
some mistake in doing so. Sorry to have bothered you.

Probably muttered the magic incantation (or imprecation) w/o realizing it.

Happens to all of us .... better that than to waste all that energy cursing it and
NOT have it work.
 

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