This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19
VP ADD RANGE NAME

VP ADD RANGE NAME 


 

VP ADD RANGE NAME ( rangeObj ; name {; options} ) 
Parameter Type   Description
rangeObj  Object in Range object
name  Text in Name for the range
options  Object in Options for the named range

The VP ADD RANGE NAME command creates or modifies a named range in the open document.

Note: Named ranges created by this command are saved with the document.

In rangeObj, pass the range that you want to name and in name, pass the new name for the range. If the name is already used within the same scope, the new named range replaces the existing one. Note that you can use the same name for different scopes (see below).

You can pass an object with additional properties for the named range in options. The following properties are supported:


PropertyTypeDescription
scopeNumberScope for the range. You can pass the sheet index (counting begins at 0) or use the following constants:

Constant Value Comment
vk current sheet -1 Designates current sheet of the 4D View Pro area (default)
vk workbook -2 Designates the entire workbook of the 4D View Pro area.

Note: The scope determines whether a range name is local to a given worksheet (scope=sheet index or vk current sheet), or global across the entire workbook (scope=vk workbook).

commentTextComment associated to named range

Notes:

  • A named range is actually a named formula containing coordinates. VP ADD RANGE NAME facilitates the creation of named ranges, but you can also use the VP ADD FORMULA NAME command to create named ranges.
  • Formulas defining named ranges can be retrieved with the VP Get formula by name command.

Example  

You want to create a named range for a cell range:

 $range:=VP Cell("ViewProArea";2;10)
 VP ADD RANGE NAME($range;"Total1")



See also 

VP Get names
VP Name

 
PROPERTIES 

Product: 4D
Theme: 4D View Pro Language
Number: 9555

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R4

 
ARTICLE USAGE

4D View Pro Reference ( 4D v19)