Click to See Complete Forum and Search --> : Arrays


gmorin
August 7th, 2000, 09:19 AM
I have declared a type which is let say MY Type

and I want to populate an array with a record of My type every time the event Private Sub cmdAddLife_Click() is generated.

How can I do??

Lothar Haensler
August 7th, 2000, 09:25 AM
dim mytypes() as MYTYPE
dim count as integer
..cmdAdd

redim preserve mytypes(count)
mytypes(count).value = value
mytypes(count).value2 = value2
count = count+1



this is PCODE!

gmorin
August 7th, 2000, 01:34 PM
Thank you for your answer, it was very helpful. Now I would like to be able to display the values of each records of the array in some fields in a vb form by using a Private Sub cmdSeePrevious_Click() event.