SetSelection method (VBA Add-In Object Model)

Sets the selection in the code pane.

Syntax

object.SetSelection (startline, startcol, endline, endcol)

The SetSelection syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
startline Required. A Long specifying the first line of the selection.
startcol Required. A Long specifying the first column of the selection.
endline Required. A Long specifying the last line of the selection.
endcol Required. A Long specifying the last column of the selection.

See also

Support and feedback

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.