Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.89 KB

getselection-method-vba-add-in-object-model.md

File metadata and controls

41 lines (29 loc) · 1.89 KB
title keywords f1_keywords ms.assetid ms.date ms.localizationpriority
GetSelection method (VBA Add-In Object Model)
vbob6.chm1098973
vbob6.chm1098973
f7275ba1-85a3-4939-2ab2-f39e750623f0
12/06/2018
medium

GetSelection method (VBA Add-In Object Model)

Returns the selection in a code pane.

Syntax

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

The GetSelection 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 that returns a value specifying the first line of the selection in the code pane.
startcol Required. A Long that returns a value specifying the first column of the selection in the code pane.
endline Required. A Long that returns a value specifying the last line of the selection in the code pane.
endcol Required. 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 output arguments. As a result, you must pass in variables because the variables will be modified to contain the information when returned.

See also

[!includeSupport and feedback]