ListColumns.Add Method
Adds a new column to the list object. Returns a ListColumn object.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function Add ( _
Position As Object _
) As ListColumn
'Usage
Dim instance As ListColumns
Dim Position As Object
Dim returnValue As ListColumn
returnValue = instance.Add(Position)
ListColumn Add(
Object Position
)
Parameters
Position
Type: System.ObjectOptional Object. Specifies the relative position of the new column that starts at 1. The previous column at this position is shifted outward.
Return Value
Type: Microsoft.Office.Interop.Excel.ListColumn
Remarks
If Position is not specified, a new rightmost column is added. A name for the column is automatically generated. The name of the new column can be changed after the column is added.