 = True
         Next iRow
      Else

         ' Remove groupings:
         DoGroup 0, sJunk(), eJunk()

         m_bGroup = True
         ' Make the relevant headers visible:
         For i = 0 To 2
            If (i &lt;= iNumber) Then
               grdOutlook.ColumnVisible("group" &amp; i + 1) = True
            Else
               grdOutlook.ColumnVisible("group" &amp; i + 1) = False
            End If
         Next i
         
         ' Sort the grid according to the groupings:
         With grdOutl