Hey all,
I have a problem with some code that I can't get around. I have 3 User Defined Types, and 8 arrays of various parts of these types. But I want to be able to save these arrays to a collection. Such as this...
[tt]
Private Type RecordItem
ID As Long
Count as Long
End Type
Private Type Record1
UID As Long
Name As String
Members() as RecordItem
End Type
Private Type Record2
UID As Long
Name As String
Groups() as Record1
End Type
Dim g_Group1() as Record1
Dim g_Group2() as Record1
Dim g_Group3() as Record1
Dim g_Group4() as Record2
Dim g_Group5() as Record3
[/tt]
So that there is how I have set up the groups as arrays of various UDT's. Now what I have to do is make a copy of these records to store the old data, then refill the records from a new structure, then move the counts from the old structure over.
So essentially what I want is something like this.
[tt]
Dim tmpGroup as Object 'or Variant or collection what ever works.
tmpGroup = g_Group1
[/tt]
The problem is that g_Group1 is an array of the type Record1, I don't want to move just one I want the whole colelction.
Craig
"I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day."
~Frank Sinatra
I have a problem with some code that I can't get around. I have 3 User Defined Types, and 8 arrays of various parts of these types. But I want to be able to save these arrays to a collection. Such as this...
[tt]
Private Type RecordItem
ID As Long
Count as Long
End Type
Private Type Record1
UID As Long
Name As String
Members() as RecordItem
End Type
Private Type Record2
UID As Long
Name As String
Groups() as Record1
End Type
Dim g_Group1() as Record1
Dim g_Group2() as Record1
Dim g_Group3() as Record1
Dim g_Group4() as Record2
Dim g_Group5() as Record3
[/tt]
So that there is how I have set up the groups as arrays of various UDT's. Now what I have to do is make a copy of these records to store the old data, then refill the records from a new structure, then move the counts from the old structure over.
So essentially what I want is something like this.
[tt]
Dim tmpGroup as Object 'or Variant or collection what ever works.
tmpGroup = g_Group1
[/tt]
The problem is that g_Group1 is an array of the type Record1, I don't want to move just one I want the whole colelction.
Craig
"I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day."
~Frank Sinatra