title | keywords | f1_keywords | ms.assetid | ms.date | ms.localizationpriority | |
---|---|---|---|---|---|---|
GetSelection method (VBA Add-In Object Model) |
vbob6.chm1098973 |
|
f7275ba1-85a3-4939-2ab2-f39e750623f0 |
12/06/2018 |
medium |
Returns the selection in a code pane.
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. |
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.
- CodePane object
- Collections (Visual Basic Add-In Model)
- Visual Basic Add-in Model reference
- Visual Basic language reference
[!includeSupport and feedback]