Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Nate,
In addition to Bob's response, you may wish to consider replacing your Collection with a scripting Dictionary. In many cases, a Dictionary is preferable to a collection and,with reference to your specific question, it has an Exists method. For more information on Dictionaries and Collections. see Chip Pearson at: http://www.cpearson.com/excel/Collec...ctionaries.htm --- Regards. Norman "NateBuckley" wrote in message ... Hello, I'm just wondering if it's possible to check to see if something exists within a collection before proceeding, I can do it with putting various "On error goto" statements, but I was just wondering if it's be possible to do something like the following without having to send the process jumping to labels. if aCollection.Item("aKey") < null then 'do something special else Msgbox "Yar! No Object 'ere!" end if I know that doesn't work, but perhaps there is a way like it? Thanks in advance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Number of objects in a collection | Excel Programming | |||
Passing Objects from Excel VBA collection to a VB6 DLL | Excel Programming | |||
Range objects in a collection | Excel Programming | |||
Track Changes Collection - Does it exist? | Excel Programming | |||
Iterate over Collection Objects in Container. | Excel Programming |