Quote:
> I have this problem
> I had declared an Array that i want to encrise....
> this is the code
> Dim MyArray() As Double
> If MyArray.GetLowerBound(0)=0 Then
> ReDim Preserve MyArray(5)
> Endif
> where i process
> If MyArray.GetLowerBound(0)=0 Then
> i found an error .. how i can test when my array have no
> elements ??
> Thanks
You do not even have an array. You only declared an array variable but never
assigned a new object.
To test if you've already assigned an array to MyArray:
If MyArray Is Nothing
If it is not Nothing, you can use MyArray.Getupperbound(0).
To create a new array, use Redim. If there are startup values for the array,
you can also use
MyArray = new Double() {1, 2, 3}
Armin