Excel Insert Text Box

If you have the Excel desktop application, here's how you can work with text box controls there: Click Open in Excel and follow the steps to add a label or text box to a worksheet. But remember that these text boxes won't be shown when you save your changes and reopen the workbook in Excel for the web. Generally, you can click Insert tab and select Text Box to insert a text box into Excel, so does inserting text boxes to charts. Click the Text Box Horizontal Text Box (or Vertical Text Box) on the Insert tab. Draw a text box in a specified chart, and type some text contents as you need.

-->

Creates a text box. Returns a Shape object that represents the new text box.

Syntax

ExcelInsert

expression.AddTextbox (Orientation, Left, Top, Width, Height)

Excel Insert Text Box Formula In Chart

expression A variable that represents a Shapes object.

Excel insert text box with formula

Excel Insert Text Box With Arrow

Parameters

Excel Insert Text Box Into Cell

NameRequired/OptionalData typeDescription
OrientationRequiredMsoTextOrientationThe orientation of the textbox.
LeftRequiredSingleThe position (in points) of the upper-left corner of the text box relative to the upper-left corner of the document.
TopRequiredSingleThe position (in points) of the upper-left corner of the text box relative to the top of the document.
WidthRequiredSingleThe width of the text box, in points.
HeightRequiredSingleThe height of the text box, in points.
Excel Insert Text Box

Return value

Shape

Example

This example adds a text box that contains the text Test Box to myDocument.

Text

Excel Insert Text Box With Formula

Support and feedback

Excel Insert Text Box With Formula

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.