Export (0) Print
Expand All

ListColumn Object

Office 2007
Represents a column in a table.

Remarks

The ListColumn object is a member of the ListColumns collection. The ListColumns collection contains all the columns in a table (ListObject object).

Use the ListColumns property of the ListObject object to return a ListColumns collection.

Example

The following example adds a new ListColumn object to the default ListObject object in the first worksheet of the active workbook. Because no position is specified, a new rightmost column is added.

Visual Basic for Applications
Sub AddListColumn()
    Dim wrksht As Worksheet
    Dim objListCol As ListColumn
   
    Set wrksht = ActiveWorkbook.Worksheets("Sheet1")
    Set objListCol = wrksht.ListObjects(1).ListColumns.Add
End Sub



Community Additions

ADD
Show:
© 2015 Microsoft