PDA

View Full Version : Help referencing an ActiveX Control Text Box



MicahD
10-25-2020, 01:45 PM
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("AnswerLink1a")).TextFrame.TextRange.Text =
Application.ActivePresentation.Slides(14).Shapes.Range(Array(Name("AnswerLink1")).TextFrame.TextRange.Text

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

I keep getting a range error.

John Wilson
10-26-2020, 06:45 AM
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