ListObject.InsertRowRange property (Excel)

Returns a Range object representing the Insert row, if any, of a specified ListObject object. Read-only Range.

Syntax

expression.InsertRowRange

expression A variable that represents a ListObject object.

Remarks

If the Insert row is not visible because the list is inactive, the Nothing object will be returned.

Example

The following example activates the range specified by the InsertRowRange property of the default ListObject object in the first worksheet of the active workbook.

Function ActivateInsertRow() As Boolean 
 
 Dim wrksht As Worksheet 
 Dim objList As ListObject 
 Dim objListRng As Range 
 
 Set wrksht = ActiveWorkbook.Worksheets(1) 
 Set objList = wrksht.ListObjects(1) 
 Set objListRng = objList.InsertRowRange 
 
 If objListRng Is Nothing Then 
 ActivateInsertRow = False 
 Else 
 objListRng.Activate 
 ActivateInsertRow = True 
 End If 
 
End Function

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.