Consulting

Results 1 to 2 of 2

Thread: Help referencing an ActiveX Control Text Box

  1. #1
    VBAX Newbie
    Joined
    Oct 2020
    Posts
    1
    Location

    Question Help referencing an ActiveX Control Text Box

    I need to pull text typed into an ActiveX Control Text Box on slide 14 of my powerpoint and display it in a normal textbox on slide 17 of my presentation. I used the following code and it worked when it was textbox - to - textbox but when I tried to switch it to ActiveX Control Text Box - to - textbox it stopped working. I am new to VBA so any help is appreciated.

    Sub Class()

    Application.ActivePresentation.Slides(17).Shapes.Range(Array(Name("AnswerLi nk1a")).TextFrame.TextRange.Text =
    Application.ActivePresentation.Slides(14).Shapes.Range(Array(Name("AnswerLi nk1")).TextFrame.TextRange.Text

    AnswerLink1a is the normal text box and AnswerLink1 is the ActiveX Control text box

    I keep getting a range error.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    1,940
    Location
    ActivX textboxes do not have a textframe.

    Try this

    ActivePresentation.Slides(17).Shapes("AnswerLink1a").TextFrame.TextRange.Text = _
    ActivePresentation.Slides(14).Shapes("AnswerLink1").OLEFormat.Object.Text
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Tags for this Thread

Posting Permissions

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