-
What I'm trying to do is something like this:
Code:
Public Type A1
SubItem1 As String
SubItem2 As String
SubItem3 As String
End Type
Public Type A2
Item1 As A1
End Type
Obviously it doesn't work (Forward reference to user-defined type error). Is there a way of doing it (use an user-defined type in another user-defined type?)
Thanks for ANY help
-
I got your code to work in VB6 Enterprise. What version are you using?
-
How stupid can I be???
I have VB 6 ent also and I finally figured out how to use this code. What I had in my program was:
Code:
Public Type A2
Item1 As A1
End Type
Public Type A1
SubItem1 As String
SubItem2 As String
SubItem3 As String
End Type
...and it causes "Forward Reference error". I can't believe that all I had to do is to switch places of the A1 and A2. It reminds me of old TurboPascal days where you were not able to use a function A from function B if the fA was declared later than fB.
Thanks for telling me it worked. After that I've figured it out.