' ************************************************ ' Collect the garbage. ' ************************************************ Private Sub CollectGarbage() Dim i As Long Dim good As Long ' Comment out for real applications. MsgBox "Collecting garbage." good = 1 ' The first good item goes here. For i = 1 To m_NumItems ' If it's not garbage, ' move it to its new location. If Not IsNull(m_List(i)) Then m_List(good) = m_List(i) good = good + 1 End If Next i ' This is where the last good item is. m_NumItems = good - 1 ' Added by Rod, 8/30/98. ' There is no garbage now. m_GarbageCount = 0 ' See if we should resize the list. If m_NumItems < m_ShrinkWhen Then ResizeList End Sub