Passing an undimensioned array to the VB6's Ubound function will cause an error, so I want to check if it has been dimensioned yet before attempting to check its upper bound. How do I do this?
How to determine if an array is initialized in VB6
arraysvb6
Related Question
- Javascript – How to append something to an array
- Javascript – How to insert an item into an array at a specific index (JavaScript)
- Java – How to determine whether an array contains a particular value in Java
- Javascript – Loop through an array in JavaScript
- Javascript – Does JavaScript have a method like “range()” to generate a range within the supplied bounds
- Javascript – How to check if an object is an array?
- Javascript – How to remove a specific item from an array
- Javascript – For-each over an array in JavaScript
Best Solution
I use this:
Usage:
Your code seems to do the same (testing for SAFEARRAY** being NULL), but in a way which I would consider a compiler bug :)