XArrayDB Reference > XArrayDB Methods > DeleteRows Method (XArrayDB) |
This method deletes count rows from an XArrayDB object starting at row index and returns the number of rows successfully deleted.
XArrayDB.DeleteRows (index, [count])
index is a long integer specifying the index of the first row to be deleted.
count is an optional long integer specifying the number of rows to be deleted. If omitted, this argument defaults to 1.
A long integer specifying the number of rows successfully deleted.
The following example initializes an XArrayDB object with 10 rows and 6 columns, then removes the first three rows:
MyArray(i, j) = "Row " & i & ", Col " & j
' Remove three rows starting at index 1.
result = MyArray.DeleteRows(1, 3)
' The next line now gives a "Subscript out of range" error.