PropNames Property
Returns a string array containing the values of the ID attribute for each Field element in the schema map for the XML list (/Map/Entry/Field@ID) in left-to-right order, which corresponds to the ordering of /Field/Range elements in the map. Read-only Variant.
expression .PropNames
expression Required. An expression that returns a ListObject object.
Remarks
For XML lists created by saving a file from Microsoft Office Excel 2003 as an XML Spreadsheet file, the ID values returned by the PropName property correspond to the column names in the header row of the XML list represented by the ListObject object. The ordering of the values returned in the array depends on the setting of the RightToLeft property.
Example
The following example shows how to get the column names in a list when the active cell is within the list:
Dim strFieldName
Dim objListObject
Set objListObject = Spreadsheet1.ActiveCell.ListObject
For Each strFieldName in objListObject.PropNames
' strFieldName now contains element (field) name for a column in the list.
Next