Dim lo as ListObject
Dim MyRange as Range
Set lo = Sheet1.ListObjects(1)
'orSet lo = Sheet1.ListObjects("Table1")
'orSet lo = MyRange.ListObject
Working with ListRows / ListColumns
Dim lo as ListObject
Dim lr as ListRow
Dim lc as ListColumn
Set lr = lo.ListRows.Add
Set lr = lo.ListRows(5)
ForEach lr in lo.ListRows
lr.Range.ClearContents
lr.Range(1, lo.ListColumns("Some Column").Index).Value = 8NextSet lc = lo.ListColumns.Add
Set lc = lo.ListColumns(4)
Set lc = lo.ListColumns("Header 3")
ForEach lc in lo.ListColumns
lc.DataBodyRange.ClearContents 'DataBodyRange excludes the header row
lc.Range(1,1).Value = "New Header Name"'Range includes the header rowNext
Converting an Excel Table to a normal range
Dim loas ListObject
Set lo = Sheet1.ListObjects("Table1")
lo.Unlist
Contributors
Topic Id: 9753
Example Ids: 30061,30062,30063
This site is not affiliated with any of the contributors.