MoveToRow Method
Description
Moves the focus and/or selection to a specified row index.
Syntax
Public Sub MoveToRow( _
ByVal RowIndex As Long, _
Optional ByVal SelectBlock As Boolean = False, _
Optional ByVal IgnoreSelection As Boolean = False _
)
Parameters
-
RowIndex: Index of the row to move focus to.
-
SelectBlock:
- When True, simulates holding down the Shift key. This will select all rows up to the row specified by RowIndex.
-
When False, the current selection will be lost and the new row will become both focused and selected.
-
IgnoreSelection:
- When True, simulates holding down the Control (Ctrl) key. This will leave the current row selection and focus the specified row at RowIndex. The row will become focused, but not selected.
Note: If SelectBlock is True, then IgnoreSelection will be ignored.
Remarks
Call this method if you want to move the currently focused row to the specified RowIndex. The MoveToRow method is used to move focus and/or selection to the specified RowIndex. This can be combined with the Shift or Control simulated keys to select multiple rows or move the focus to the specified RowIndex without selecting the row.
See Also

Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.