A problem with user defined data type
I'm creating certain user-form for a data input.
For that purpose i defined a data type.
If i put its definition in the public area:
Code:
Public area:
Type DataX 'defining data type which has to contain everything about a product
PriceX As Integer
ColorX() As Variant
SizeX() As Variant
End Type
.
.
.
Private Sub Fill()
Dim Products() As DataX
Products(0).PriceX = 25
Products(0).ColorX = Array("red", "blue")
Products(0).SizeX = Array("L", "XL", "XXL")
i get:
Quote:
Compile Error:
Cannot define a public user-defined type within an object module
But if i move it (Type definition) to the Private Sub i get:
Quote:
Compile Error:
Invalid inside procedure
How do i fill my array of arrays ?:help
Many thanks in advance