Johnny Andersson wrote:
Hi again!
Let's say that I modify your example as follows:
Type MyType
aName as String
aAge as Integer
Things() as String
End Type
Sub Main
Dim mt(20) As New MyType
mt(13).aName = "Tom"
mt(13).aAge = 42
Msgbox mt.aName & ", " & mt.aAge
End Sub
I guess I could REDIM the whole mt() by just adding something like:
REDIM mt(40)
correct
But what about, for example, mt(17).Things?
REDIM mt(17).Things(200)
And maybe Tom has only 78 Things, like
REDIM mt(13).Things(78)
Is this allowed and will it work? I only want to REDIM Things for ONE
of the mt elements.
No.
REDIM redimensions an array
you have an array of mytype
Things within Mytype is a string.
This is 'dimensionsed' automatically to fit the length of the string
when you assign a string to it.
Dave Legge
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]