Dave used his keyboard to write :
> Thank you all so very much. Garry, I got an error 457 with your code,
> "Object is already an element in the collection" ?? I didn't try to
> troubleshoot too hard since Isabell solution worked great. It's not
> too large a worksheet the a loop would be too slow.
>
> Dave
Here's my fix after looking back at the project Ron and I worked on...
Sub GetUniqueItems2()
Dim vData As Variant, n&, lLastRow&, sMsg$
lLastRow = Cells(Rows.Count, "H").End(xlUp).Row
If lLastRow = 1 Then Exit Sub '//no data
vData = Range("H1:H" & lLastRow)
Dim oColl As New Collection
On Error Resume Next
For n = LBound(vData) To UBound(vData)
If Not IsDate(vData(n, 1)) Then oColl.Add vData(n, 1), vData(n, 1)
Next 'n
For n = 1 To oColl.Count
sMsg = sMsg & "," & oColl(n)
Next 'n
MsgBox Mid$(sMsg, 2)
End Sub
--
Garry
Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion