Cant get to textBox properties

  • Thread starter Thread starter Roger Seiler
  • Start date Start date
R

Roger Seiler

I got stuck with this:

Dim myTB As Shape
Set myTB = Application.ActivePresentation.Slides(2).Shapes("217")


MsgBox myTB.Type
With myTB
.MultiLine = True
.WordWrap = True
.Value = "-----------"
End With

I get an error with setting the .MultiLine but in the message box I can see
that it is a text box.
What have I done wrong?
 
The MultiLine property is a property of a control textbox, not a regular
shape with a TextFrame. What are you trying to do that you want to set
MultiLine to True?
--David

--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
I got stuck with this:

Dim myTB As Shape
Set myTB = Application.ActivePresentation.Slides(2).Shapes("217")

MsgBox myTB.Type
With myTB
.MultiLine = True
.WordWrap = True
.Value = "-----------"
End With

I get an error with setting the .MultiLine but in the message box I can see
that it is a text box.
What have I done wrong?

Thanks for posting the code - it's also a good idea to post the exact text of
the error message. David's nailed it, I think. If you're working with a
normal PPT shape, it doesn't have .MultiLine or .Value properties.

If you're working with a text box from the control box, use this instead:

(watch out for line breaks - the following is all one line)

Set myTB =
Application.ActivePresentation.Slides(2).Shapes("217").OLEFormat.Object
 

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

Back
Top