Consulting

Results 1 to 3 of 3

Thread: PPT SlideShow fill

  1. #1
    VBAX Newbie
    Joined
    Nov 2013
    Posts
    2
    Location

    PPT SlideShow fill

    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

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    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!
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Newbie
    Joined
    Nov 2013
    Posts
    2
    Location
    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.

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •