Name

listobject.Unlist( )

Synopsis

Converts a list to a normal range of cells. If the list displays a totals row, that row becomes part of the range. The following code hides the totals row and then converts a list to a range:

Sub ConverToRange(  )
    Dim ws As Worksheet, lst As ListObject
    Set ws = ActiveSheet
    ' Get the first list on the worksheet.
    Set lst = ws.ListObjects(1)
    ' Convert it to a range.
    lst.Unlist
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.