This example retrieves all the values in a given column from the selected range of rows and loads them into an array for later use.
Sub Command1_Click ()
Dim I
ReDim CalcArray (0 to DataGrid1.SelBookmarks.Count - 1)
For I = 0 to DataGrid1.SelBookmarks.Count -1
' Puts the value of the current row in the selected row
' array into corresponding CalcArray cell.
CalcArray(I) = _
DataGrid1.Columns(1).CellValue(DataGrid1.SelBookmarks(I))
Next I
End Sub