 To iColumns) As tGridCell
    ' Get inital shell sort increment
    If (iItemCount &gt; 2) Then
        iIncrement = piGetSuitableShellSortInitialIncrement(iItemCount)
        Do Until iIncrement &lt; 1
            For iMainLoop = iIncrement + 1 To iItemCount
                ' Store iMainLoop in vSortItems():
                For iCol = 1 To iColumns
                    LSet vSortItems(iCol) = vItems(iCol, iMainLoop)
                Next iCol
                LSet tSortRow = tRows(iMainLoop)
                