VB6 dynamic array definition
In VB6, you can declare an array statically and dynamically. When an array is declared dynamically, is it possible to determine if the array was declared dynamic, and so it might need "redim" before it can be used? that is, I'm looking for something like:
if myarray is dynamic then
redim ...
end if
myarray(x) = y
+1
a source to share
2 answers
Unfortunately there is nothing to tell if the array is dynamic. You could probably hack something together using specialized knowledge of the basic implementation of VB6 arrays, as in Matt Kurland's book.
I think the best approach is to use the function in this answer . It checks if the array is a dynamic array, which should be ReDimmed.
+1
a source to share