gar3th_jon3s
09-09-2003, 09:13 AM
Hi, I am having the following problem:
How can I check if an array has been dim'ed as dynamic, has been redim'ed and populated?
The only way around this I have found is to do the following:
Dim vNumbers as variant
vNumbers = SomeFunction() ' this returns as array of doubles
If IsArray(vNumbers) Then
' Do stuff..
End If
I dont want to use variants though, ideally i would like to do something like:
Dim aNumbers() as Double
aNumbers = SomeFunction()
' Need to check if array has anything in now.. HOW!?
I always get errors because obviously the array needs to be redim'ed before it can be used.
Dont know if i have explained that very well, cheers for any help
Gareth JOnes
How can I check if an array has been dim'ed as dynamic, has been redim'ed and populated?
The only way around this I have found is to do the following:
Dim vNumbers as variant
vNumbers = SomeFunction() ' this returns as array of doubles
If IsArray(vNumbers) Then
' Do stuff..
End If
I dont want to use variants though, ideally i would like to do something like:
Dim aNumbers() as Double
aNumbers = SomeFunction()
' Need to check if array has anything in now.. HOW!?
I always get errors because obviously the array needs to be redim'ed before it can be used.
Dont know if i have explained that very well, cheers for any help
Gareth JOnes