ListObject.ListColumns property (Excel)
Returns a ListColumns collection that represents all the columns in a ListObject object. Read-only.
Syntax
expression.ListColumns
expression A variable that represents a ListObject object.
Example
The following example displays the name of the second column in the ListColumns collection object as created by a call to the ListColumns property. For this code to run, the Sheet1 worksheet must contain a table.
Sub DisplayColumnName
Dim wrksht As Worksheet
Dim objListObj As ListObject
Dim objListCols As ListColumns
Set wrksht = ActiveWorkbook.Worksheets("Sheet1")
Set objListObj = wrksht.ListObjects(1)
Set objListCols = objListObj.ListColumns
Debug.Print objListCols(2).Name
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for