PDA

View Full Version : PPT SlideShow fill



mrih7
11-23-2013, 08:02 PM
I'm getting beyond frustrated at this point with this so any help would be greatly appreciated.

Office 2010
I'm trying to create a loop where selecting a button on the first slide will update text boxes across the PPT. These updated textboxes start on slide 4 and go onward. Now not all slides will have this textbox, but most will. (An example in non-loop form is included below). Does anyone know a good way to do this?


Private Sub Submit1_Click()


Slide1.userName.Text = Slide4.userName.Text
Slide1.userName.Text = Slide5.userName.Text
Slide1.userName.Text = Slide6.userName.Text
Slide1.userName.Text = Slide7.userName.Text
'...etc will continue to .Slides.Count

End Sub

John Wilson
11-24-2013, 02:35 AM
While you don't say so I guess the user is entering their name on slide 1 in a control textbox from the control toolbox and you want it duplicated on other slide in another control textbox.

You DO need to use the control textbox on slide one because theat is the only way people can enter text in show view. However it is a mistake to use a CONTROL toolbox on the other slides.

Use a simple shape or textbox and name it in the selection pane to e.g. "NameBox". If using a textbox enter some dummy text.

The code then would be


Private Sub Submit1_Click()
Dim osld As Slide
On Error Resume Next
For Each osld In ActivePresentation.Slides
osld.Shapes("NameBox").TextFrame.TextRange = _
ActivePresentation.Slides(1).Shapes("username").OLEFormat.Object.Text
Next osld
End Sub

I would not use Slide1.username unless you are certain you understand how object container names (like Slide1) work. Slide1 is not necessarily the first slide and Slide4 not the fourth!

mrih7
11-24-2013, 11:06 AM
While you don't say so I guess the user is entering their name on slide 1 in a control textbox from the control toolbox and you want it duplicated on other slide in another control textbox.
Yes, that's exactly what I meant, sorry for not clarifying that. :doh:

Perfect! Thanks for the information on that one. I haven't worked as much with PPT options as I have with Excel so I wasn't entirely sure what I was doing.