Please note javascript is required for full website functionality.

Blog

VBA Blogs: ListColumn Swan Song

19 January 2018

This is the ninth blog in the series about using ListObjects to manipulate Tables within an Excel workbook in VBA. Today we will be featuring ListColumns.

Let's start with the Aria_TopTen table:

Visually, it is clear that there are 3 columns in the table. ListColumns can be used to determine how many columns are in a table. This is done by using the COUNT method.

The result is:

But what if one wanted to know what was the 2nd column in the table? Then the Item method can help impart that information.

However, this is directly equivalent to using the Cells property of HeaderRowRange as examined in a previous blog here.

Hope you enjoyed ListColumns, come back next time to ListRows!

Newsletter