m_iSortIndexCount
      bR = pbIsGreater( _
         vItems(m_tSort(iSortIndex).Column, iRow1), _
         vItems(m_tSort(iSortIndex).Column, iRow2), _
         iSortIndex, bIsEqual)
      If (iSortIndex &lt; m_iSortIndexCount) And bIsEqual Then
         ' Must go to the next one
      Else
         pbGreater = bR
         Exit For
      End If
   Next iSortIndex
   
End Function

Private Function pbIsGreater( _
        ByRef vSortItem As tGridCell, _
        ByRef vItem As tGridCell, _
        ByVal iSortI