what's going wrong?
in a module i have made a userdefined type:
Type Test
x as Integer
y as String
End Type
in the general Declarations section i have initialized the array:
'just according to the help-files and examples
Dim TestArray() As Test
'and a variable i need later
Dim Counter
So now i have an array of zero and i can use ReDim to change the size.
In the Form_load event i set the Counter to zero:
Counter=0
In a procedure i have to change the size, i coded like this:
Sub Command1_click()
Counter=Counter+1
ReDim TestArray(Counter) As Test
TestArray(Counter).x=1
TestArray(Counter.y="a"
end Sub
When i run this i get the error Subscipt Out of Range on the line
where if want to fill the array (TestArray(Counter).x=1).
So i tryed an search but it will not work just as it just to be.
The only way it works is when i give the array a size:
Dim TestArray(5) As Test
Then it works fine but thats not what i want.
So if anyone can help????
thanks in advance
gr. walther
------------------- cut here ---------------
Walther Musch
Tilburg University Holland