Hey all
Im having trouble defining an array of an array of user defined types.
So far i have:
VB Code:
Public Type POINTAPI X As Long Y As Long End Type Public Points() As POINTAPI Public Objects() As Variant
VB Code:
Private Sub Form_Load() Objects = Array() ReDim Points(0) As POINTAPI ReDim Objects(0) As Variant End SubVB Code:
Private Sub cmdcomplete_Click() Objects(UBound(Objects)) = Points ReDim Objects(UBound(Objects) + 1) Erase Points ReDim Points(0)
Basicly points is an array of coords that defines a polygon. When cmdcomplete is clicked this polygon is added to the objects array, and the points array initialized to create another polygon ;d
Thanks for any help
/edit, compiler doesn't like line: Objects(UBound(Objects)) = Points
Stating: Only UDT defined in public object modules can be coerced to or from a variant.


Reply With Quote
!
