Columns Collection Methods: Insert 

Purpose

Inserts an object into the Columns collection.

Syntax

The Insert method has the syntax:

Insert(Variant vaIndex,Variant vaWhat)

Returns

type Object

Description

This method inserts an object into the collection. Legal types for the parameter vaIndex are:

Type

Description

Any type convertible to an integer

The parameter vaIndex is converted to an integer and used as index in the collection. The object is inserted prior to the object found.

String that is not convertible to an integer

The parameter vaIndex is used to search the object by name. Prior to this object the new object is inserted.

Object

The parameter vaindex is used to search the objects. Prior to this object the new object is inserted.

Legal types for the parameter vaWhat are the same as for the Add Method.

Using a vaWhat parameter that is a Column object is legal. A column may be inserted as many times as desired.