K
Kaval
I have created a text box named "TextBox_One" on sheet "Sheet_One" using the
following:
Sheets("Sheet_One").Shapes.AddTextbox(msoTextOrientationHorizontal, 100,
100, 100, 400).Name = "TextBox_One"
I would like to edit the text box by adding text, changing borders etc but I
can't get the code to work. I have used the macro recorder to generate the
code but I do not want to select the object to perform the edits and I can't
seem to adapt the code to work.
For example, to add text I tried the following
Sheets("Sheet_One").Shapes("TextBox_One").Characters.Text = "Sample Text"
but got the error message "Object doesn't support this property or method"
Any help appreciated, Kaval
following:
Sheets("Sheet_One").Shapes.AddTextbox(msoTextOrientationHorizontal, 100,
100, 100, 400).Name = "TextBox_One"
I would like to edit the text box by adding text, changing borders etc but I
can't get the code to work. I have used the macro recorder to generate the
code but I do not want to select the object to perform the edits and I can't
seem to adapt the code to work.
For example, to add text I tried the following
Sheets("Sheet_One").Shapes("TextBox_One").Characters.Text = "Sample Text"
but got the error message "Object doesn't support this property or method"
Any help appreciated, Kaval