P
pacer1
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
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