4D v18VP Get active cell |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v18
VP Get active cell
|
VP Get active cell ( vpAreaName {; sheet} ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
vpAreaName | Text |
![]() |
4D View Pro area form object name | |||||
sheet | Longint |
![]() |
Sheet index (current sheet if omitted) | |||||
Function result | Object |
![]() |
Range object of single cell | |||||
The VP Get active cell command returns a new range object referencing the cell which has the focus and where new data will be entered (the active cell).
In vpAreaName, pass the name of the 4D View Pro area. If you pass a name that does not exist, an error is returned.
In the optional sheet parameter, you can designate a specific spreadsheet where the range will be defined (counting begins at 0). If omitted, the current spreadsheet is used by default. You can explicitly select the current spreadsheet with the following constant:
Constant | Value | Comment |
vk current sheet | -1 | Designates current sheet of the 4D View Pro area (default) |
The following code:
$activeCell:=VP Get active cell("myVPArea")
//returns a range object containing:
//$activeCell.ranges[0].column=3
//$activeCell.ranges[0].row=4
//$activeCell.ranges[0].sheet=0
will retrieve the coordinates of the active cell:
VP ADD SELECTION
VP Get selection
VP RESET SELECTION
VP SET ACTIVE CELL
VP SET SELECTION
VP SHOW CELL
Product: 4D
Theme: 4D View Pro Language
Number:
905262
Created: 4D v17 R5
4D View Pro Reference ( 4D v18)