Table of contents
TOC
Collapse the table of content
Expand the table of content

GetSelection Method (VBA Add-In Object Model)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Returns the selection in a code pane. Syntaxobject.GetSelection(startline, startcol, endline, endcol) The GetSelection syntax has these parts:

PartDescription
objectRequired. An object expression that evaluates to an object in the Applies To list.
startlineRequired. A Long that returns a value specifying the first line of the selection in the code pane.
startcolRequired. A Long that returns a value specifying the first column of the selection in the code pane.
endlineRequired. A Long that returns a value specifying the last line of the selection in the code pane.
endcolRequired. A Long that returns a value specifying the last column of the selection in the code pane.

Remarks When you use the GetSelection method, information is returned in outputarguments. As a result, you must pass in variables because the variables will be modified to contain the information when returned.

© 2018 Microsoft