Skip to main content
Version: 20 R6 BETA

VP MOVE CELLS

History
ReleaseChanges
19 R4Added

VP MOVE CELLS ( originRange : Object ; targetRange : Object ; options : Object )

ParameterTypeDescription
originRangeObject->Cell range to copy from
targetRangeObject->Target range for the values, formatting and formulas
optionsObject->Additional options

Description

The VP MOVE CELLS command moves or copies the values, style and formulas from originRange to targetRange.

originRange and targetRange can refer to different View Pro areas.

In originRange, pass a range object containing the values, style, and formula cells to copy or move. If originRange is a combined range, only the first one is used.

In targetRange, pass the range of cells where the cell values, style, and formulas will be copied or moved.

The options parameter has several properties:

PropertyTypeDescription
copyBooleanDetermines if the values, formatting and formulas of the cells in originRange are removed after the command executes:
  • False (default) to remove them
  • True to keep them
pasteOptionsLongintSpecifies what is pasted. Possible values:

ValueDescription
vk clipboard options all (default)Pastes all data objects, including values, formatting, and formulas.
vk clipboard options formattingPastes only the formatting.
vk clipboard options formulasPastes only the formulas.
vk clipboard options formulas and formattingPastes the formulas and formatting.
vk clipboard options valuesPastes only the values.
vk clipboard options value and formattingPastes the values and formatting.

The paste options defined in the workbook options are taken into account.

Example

To copy the contents, values, formatting and formulas from an origin range:

var $originRange; $targetRange; $options : Object

$originRange:=VP Cells("ViewProArea"; 0; 0; 2; 5)

$targetRange:=VP Cells("ViewProArea"; 4; 0; 2; 5)

$options:=New object
$options.copy:=True
$options.pasteOptions:=vk clipboard options all

VP MOVE CELLS($originRange; $targetRange; $options)

See also

VP Copy to object
VP PASTE FROM OBJECT
VP SET WORKBOOK OPTIONS