collection usage/syntax please
Dim colTest As Collection
Dim i As Long
Set colTest = New Collection
For i = 1 To 10
colTest.Add "Key" & i, "Item" & i
Debug.Print colTest.Item(i)
Next i
Set colTest = Nothing
--
HTH
Bob Phillips
"dick" wrote in message
oups.com...
What is the proper syntax for the collection statements in the
following pseudo code:
Dim C as Collection
Loop over cells in a range:
C = New Collection [or is it Set C =.....]
LoadC ( C , cell from Loop)[will add item to collection]
UseC (C) [will use or do something with the collection]
C = Nothing [is this proper, all examples use a Remove]
Next Loop over cells
Thanks.
|