Sub exaCollections()
Dim colParent As New Collection
Dim colChild As New Collection
Dim tdfBooks As TableDef
Dim objVar As Object
Set tdfBooks = DBEngine(0)(0).TableDefs!Employees
colParent.Add colChild
colParent.Add tdfBooks
Debug.Print colParent.Count
For Each objVar In colParent
If TypeOf objVar Is Collection Then
Debug.Print "Collection"
ElseIf TypeOf objVar Is TableDef Then
Debug.Print objVar.Name
End If
Next
End Sub
|