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??
Printable View
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??
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!
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.