Insert

concerns

With the Insert attribute function, a new entry can be inserted on a distinct index. Entries with higher index might be moved to their next higher index.

 

Syntax

Insert(Value, Index)

Return value

No

Parameter

Use

Name

Type

Passing

Description

Required

Value

Variant

ByVal

Value to be inserted

Required

Index

Long

ByVal

The index, the value ist to be inserted

 

Example:

 

Colors.Add({"red", "blue", "green"})

MsgBox(Colors.JoinCSV(", ", ""))

#shows red, blue, green

 

Colors.insert({"yellow", "brown"}, 2)

MsgBox(Colors.JoinCSV(", ", ""))

#shows red, blue, yellow, brown, green