View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pacer1 pacer1 is offline
external usenet poster
 
Posts: 4
Default Help with Emptying a Collection

Hello,

I am trying to empty a collection and am receiving an error message:

Run-time error '424':

Object Required



Sub CollectionEmptyTry()
Dim Obj As String
Obj = Range("P17").Value

If Cells(1, 1) < "" Then
CheckEmpty.Add Obj
End If

If CheckEmpty.Count 20Then
Set CheckEmpty = Empty
End If

MsgBox CheckEmpty.Count


End Sub


Any help with this error would be greatly appreciated.

Also any suggestions on different ways to empty a collection?

Is there any way to remove more than 1 item with the Remove Method?
CheckEmpty.Remove (1 to CheckEmpty.count) ???

Thanks,

pace