Description
Represents a text box graphic object (a rectangle with text in it) on a chart sheet, dialog sheet, or worksheet.
Accessors
The TextBox object is a member of the TextBoxes collection. The TextBoxes collection contains all the TextBox objects on a single sheet. Use the Add method to create a new text box and add it to the collection.
To access a single member of the collection, use the TextBoxes method with the index number or name of the text box as an argument.
The following example sets the formula for text box one on the worksheet named "Sheet1." This links the text box to cell A10 on the worksheet. When the contents of cell A10 change, the new contents are placed in the text box.
Worksheets("sheet1").TextBoxes(1).Formula = "=a10"
The text box name is shown in the Name Box when the text box is selected. Use the Name property to set or return the name. The following example places a dashed border around the text box named "Text 1" on the worksheet named "Sheet1."
Worksheets("sheet1").TextBoxes("text 1").Border.LineStyle = xlDash
Properties
AddIndent Property, Application Property, AutoSize Property, Border Property, BottomRightCell Property, Caption Property, Creator Property, Enabled Property, Font Property, Formula Property, Height Property, HorizontalAlignment Property, Index Property, Interior Property, Left Property, Locked Property, LockedText Property, Name Property, OnAction Property, Orientation Property, Parent Property, Placement Property, PrintObject Property, RoundedCorners Property, Shadow Property, Text Property, Top Property, TopLeftCell Property, VerticalAlignment Property, Visible Property, Width Property, ZOrder Property.
Methods
BringToFront Method, Characters Method, CheckSpelling Method, Copy Method, CopyPicture Method, Cut Method, Delete Method, Duplicate Method, Select Method, SendToBack Method.