SetTextBox

Creates the specified TextBox if it doesn't exist, and sets the specified properties of it.

Overloads

Overload Name Description
BringForward Bring a text box forward.
BringToFront Bring a text box to front.
CancelEdit Cancels edit mode and discards any changes made in the text box.
EndEdit Ends edit mode and commits any changes made in the text box.
FlipHorizontal Flip a text box horizontally.
FlipVertical Flip a text box vertically.
General Add or modify a text box.
IncrementLeft Increment the left position of a text box.
IncrementTop Increment the top position of a text box.
Remove Remove a text box.
ScaleHeight Scales a text box per the specified factor.
ScaleWidth Scales a text box per the specified factor.
Select Select a text box.
SendBackward Send a text box backwards.
SendToBack Send a text box to the back.


BringForward

Bring a text box forward.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.

BringToFront

Bring a text box to front.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.

CancelEdit

Cancels edit mode and discards any changes made in the text box.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.

EndEdit

Ends edit mode and commits any changes made in the text box.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.

FlipHorizontal

Flip a text box horizontally.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.

FlipVertical

Flip a text box vertically.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.

General

Add or modify a text box.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.
Text The text.
OnClickProcedure The name of the procedure to execute when the text-box is clicked.
OnDoubleClickProcedure The name of the procedure to execute when the text-box is double-clicked.
OnTextChangedProcedure The name of the procedure to execute when the text changes.
Placement The placement behavior of the text box.
Specify one of the following values or an arbitrary value: <blank>FreeFloatingMoveMoveAndSize
Column The column to put the TextBox into. 0.0 is the left edge of the first column. 0.5 is the middle of the first column, etc. If used with the ColumnPoints argument then the two are added together.
EndColumn The column the will define the width of the text box. The Width argument can be used instead of this.
ColumnPoints The position of the left edge of the TextBox in points. If used with the Column argument then the two are added together.
Row The row to put the TextBox into. 0.0 is the top edge of the first row. 0.5 is the middle of the first row, etc. If used with the RowPoints argument then the two are added together.
EndRow The row the will define the height of the text box. The Height argument can be used instead of this.
RowPoints The position of the top edge of the TextBox in points. If used with the Row argument then the two are added together.
Width The width of the TextBox in points.
Height The height of the TextBox in points.
LockAspectRatio Whether the text box's aspect ratio is locked.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Locked Whether the text box is locked.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Visible Whether the text box is visible.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
PrintTextBox Whether to print the text box.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
FillBackColor Select the fill back color.
FillBackColorIndex Excel color palette index to use for the fill back color. The value is zero-based from 0 to 55.
Specify one of the following values or an arbitrary value: <blank>012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
FillForeColor Select the fill forecolor.
FillForeColorIndex Excel color palette index to use for the fill forecolor. The value is zero-based from 0 to 55.
Specify one of the following values or an arbitrary value: <blank>012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
FillTransparency From 0.0 to 1.0 (opaque to transparent).
FillVisible Whether the fill is visible.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
FontBold Whether font is bold.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
FontColor Select the font color.
FontColorIndex Excel color palette index to use for the font color. The value is zero-based from 0 to 55.
Specify one of the following values or an arbitrary value: <blank>012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
FontItalic Wether the font is italicized.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
FontName Select a font.
FontOutlineFont Whether the font has the outline effect.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
FontShadow Whether the font has the shadow effect.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
FontSize The font size, in points.
FontStrikethrough Whether the font has the strikethrough effect.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
FontSubscript Whether the font has the subscript effect.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
FontSuperscript Whether the font has the superscript effect.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
FontUnderline Whether the font has the underline effect.
Specify one of the following values or an arbitrary value: <blank>SingleSingleAccountingDoubleDoubleAccountingNone
BorderColor Select the color for the line forecolor.
BorderColorIndex Excel color palette index to use for the line forecolor. The value is zero-based from 0 to 55.
Specify one of the following values or an arbitrary value: <blank>012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
BorderTransparency From 0.0 to 1.0 (opaque to transparent).
BorderVisible Whether the line is visible.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
BorderWeight The weight of the line, in points.
TextAutoSize Whether the size of the text box will increase to display all of the text.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
TextHorizontalAlignment The horizontal alignment.
Specify one of the following values or an arbitrary value: <blank>GeneralLeftCenterRightFillJustifyCenterAcrossSelectionDistributed
TextLockText Whether text will be locked when sheet protection is enabled.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
TextMarginBottom The bottom margin of this text box in points.
TextMarginLeft The left margin of this text box in points.
TextMarginRight The right margin of this text box in points.
TextMarginTop The top margin of this text box in points.
TextOrientation The orientation of the text.
Specify one of the following values or an arbitrary value: <blank>MixedHorizontalVerticalFarEastUpwardDownwardHorizontalRotatedFarEastVertical
TextVerticalAlignment The vertical alignment.
Specify one of the following values or an arbitrary value: <blank>TopCenterBottomJustifyDistributed

IncrementLeft

Increment the left position of a text box.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.
Increment Specifies the increment in points.

IncrementTop

Increment the top position of a text box.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.
Increment Specifies the increment in points.

Remove

Remove a text box.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.

ScaleHeight

Scales a text box per the specified factor.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.
Factor Specifies the factor by which to scale the original or current size.
UseOriginalSize Whether the original or current as the starting size.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
ScaleFromPosition Whether the size should be scaled from the top-left, middle or bottom-right of the shape.
Specify one of the following values or an arbitrary value: <blank>TopLeftMiddleBottomRight

ScaleWidth

Scales a text box per the specified factor.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.
Factor Specifies the factor by which to scale the original or current size.
UseOriginalSize Whether the original or current as the starting size.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
ScaleFromPosition Whether the size should be scaled from the top-left, middle or bottom-right of the shape.
Specify one of the following values or an arbitrary value: <blank>TopLeftMiddleBottomRight

Select

Select a text box.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.
Replace Whether to replace the current selection of shapes, or add this shape to the selections.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE

SendBackward

Send a text box backwards.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.

SendToBack

Send a text box to the back.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Name The name of the TextBox.