0

How can I set columns number for the textbox in VBA for Excel? (excel located -> format shape -> text box -> columns). I have tried to look all over internet and office help but i can find only read only property column on the text box. I use Office 2010

2 Answers 2

1

I just recorded a macro, and it came up with this:

    ActiveSheet.Shapes.Range(Array("TextBox 1")).Select
    Selection.ShapeRange.TextFrame2.Column.Number = 2
Sign up to request clarification or add additional context in comments.

Comments

0

After a cut-n-paste from a Word doc, I found I had a text box called "Text Box 1". One line (demo for the immediate window) shows the number of columns :
? Sheets(1).Shapes("Text Box 1").TextFrame2.Column.Number

and FWIW the text in the box is :
? Sheets(1).Shapes("Text Box 1").TextFrame.Characters.Text

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.