|
-
Oct 30th, 2002, 04:46 PM
#1
Thread Starter
New Member
Testing to see if a collection is initialized
OK. So I haven't played with VB in a few years. And it shows. Bah.
I've got a function that is passed a collection as an optional argument. I need to test whether or not that collection was initialized. Unfortunately, isEmpty only returns valid data for variants. In my mind, this should be fairly easy to do... but it escapes me at the moment. Any help would be appreciated.
BTW, I'm using the Office 97 version of VB, if it matters. It was what was available.
Thanks,
DAlexander
-
Oct 30th, 2002, 04:48 PM
#2
If collectionname Is Nothing Then
' blah
End If
I think.
-
Oct 30th, 2002, 04:51 PM
#3
It depends what you mean by initialized. Every collection has a Count property and a Count of 0 means of course that it's empty.
-
Oct 30th, 2002, 04:53 PM
#4
Thread Starter
New Member
Props go to Candor. The IS keyword. Who would have guessed?
-
Oct 30th, 2002, 04:55 PM
#5
Originally posted by DAlexander
Who would have guessed?
Well....me of course!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|