ListObject::Resize Method (Range^)

 

Enables a ListObject control to be resized over a new range.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

void Resize(
	Range^ Range
)

Parameters

Range
Type: Microsoft.Office.Interop.Excel::Range^

The new range for the list.

No cells are inserted or moved by this property.

The header must remain in the same row and the resulting list must overlap the original list. The list must contain a header row and at least one row of data.

For lists that are linked to a server that is running Microsoft Windows SharePoint Services, you can resize the list using this method by providing a Range argument that differs from the current range of the ListObject only in the number of rows it contains. Attempting to resize lists linked to Windows SharePoint Services by adding or deleting columns (in the Range argument) results in a run-time error.

The following code example creates a ListObject on the current worksheet and then calls the Resize method to increase the size of the ListObject.

This example is for a document-level customization.

No code example is currently available or this language may not be supported.
Return to top
Show: