XArrayDB Reference > XArrayDB Methods > InsertRows Method (XArrayDB) |
This method inserts count rows into an XArrayDB object starting at row index and returns the number of rows successfully inserted.
XArrayDB.InsertRows (index, [count])
index is a long integer specifying the index of the first row to be inserted.
count is an optional long integer specifying the number of rows to be inserted. If omitted, this argument defaults to 1.
A long integer specifying the number of rows successfully inserted.
The following example initializes an XArrayDB object with 10 rows and 6 columns, then inserts three new rows before the first row:
MyArray(i, j) = "Row " & i & ", Col " & j
' Insert three new rows at index 1.
result = MyArray.InsertRows(1, 3)
Debug.Print IsEmpty(MyArray(1, 1))