Shapes.AddTextbox Method
Excel Developer Reference |
Creates a text box. Returns a Shape object that represents the new text box.
Syntax
expression.AddTextbox(Orientation, Left, Top, Width, Height)
expression A variable that represents a Shapes object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Orientation | Required | MsoTextOrientation | The orientation of the textbox. |
Left | Required | Single | The position (in points) of the upper-left corner of the text box relative to the upper-left corner of the document. |
Top | Required | Single | The position (in points) of the upper-left corner of the text box relative to the top of the document. |
Width | Required | Single | The width of the text box, in points. |
Height | Required | Single | The height of the text box, in points. |
Return Value
Shape
Example
This example adds a text box that contains the text "Test Box" to myDocument
.
Visual Basic for Applications |
---|
|
See Also