User-Defined Types

I am looking for assistance with regards to the code snippet below. I am attempting to assign a dynamic array (NewArray) of user-defined type, TestThis, to a Variant variable of another user-defined type, TestThisList. When attempting to compile this code, I get a “Type mismatch on: NEWARRAY” error, at the line I am attempting the assignment. I believe I should be able to make this assignment. What am I missing? Any suggestions would be much appreciated

(Declarations)

Type TestThis

testNumber As Integer

testString As String

testBoolean As Boolean

End Type

Type TestThisList

id As String

typeHolder As Variant	

End Type

Dim ListHolder() As TestThisList

Sub Initialize

Dim NewArray() As TestThis



Redim Holder(3) As TestThisList

Redim NewArray(3) As TestThis



NewArray(0).testNumber = 2

NewArray(0).testString = "Hello"

NewArray(0).testBoolean = True



NewArray(1).testNumber = 4

NewArray(1).testString = "Goodbye"

NewArray(1).testBoolean = True



NewArray(2).testNumber = 6

NewArray(2).testString = "Blue"

NewArray(2).testBoolean = False



Holder(0).id = "9999"	

Holder(0).typeHolder = NewArray

End Sub

Subject: User-Defined Types

copy/pasted your code into a new agent and it compiles for me using 6.5.3 Designer. You didn’t mention what version you’re using.

Subject: RE: User-Defined Types

I am using 6.5.3 Designer. Tried the code on 6.5.2 and was also unsuccessful.