Skip to main content

ListColumns object

Table of contents
  1. Remarks
  2. Example

A collection of all the ListColumn objects in the specified ListObject object.

Remarks

Each ListColumn object represents a column in the table.

Example

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

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

Set myNewColumn = Worksheets(1).ListObject(1).ListColumns.Add

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>