Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

ListObject.InsertRowRange Property (2007 System)

Gets a Range that represents the Insert row, if any, of the ListObject control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
[BrowsableAttribute(false)]
public Range InsertRowRange { get; }

Property Value

Type: Range
A Range that represents the Insert row, if any, of the ListObject control.

If there is no Insert row, InsertRowRange returns null.

The following code example creates a ListObject, gets the range that contains the Insert row, and then displays a message showing how many cells the Insert row contains.

This example is for a document-level customization.

private void ListObject_InsertRowRange()
{
    Microsoft.Office.Tools.Excel.ListObject list1 =
        this.Controls.AddListObject(
        this.Range["A1", "C4"], "list1");

    Excel.Range insertRow = list1.InsertRowRange;
    MessageBox.Show("The insert row contains " + 
        insertRow.Cells.Count.ToString() +
        " cells.");
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.