collection obj
On Jan 31, 11:18*am, cate wrote:
I'm having some trouble with the collection obj. *My first time out.
I seem can't test it.
(placing strings into what I would call a hash/dictionary. *Am I doing
that?)
Dim usedFields As Collection
Set usedFields = New Collection
usedFields.Add("string); *' *doesn't die
Later, I want to know if an item exists
if usedFields.Item("string")
if exists.usedFields ...
if usedFields.Item("string") < ""
if usedFields.Item("string") < 0
All get me the yellow bug line. *How do test for exists?
Help. *Thank you.
It's one of these - answer myself posts.
I installed a reference to Microsoft Scripting Runtime and got a
Dictionary. I don't know how this will affect the portability of the
code within the company but for now it's working just fine. Sorry for
the post.
|