Bonjour,
Je ne pense pas que votre code puisse fonctionner.
ci-dessous une proposition en utilisant plutôt un module de classe qu'un Type utilisateur
1- création d'un module de classe nommé TA
Private v1 As Integer, v2 As Integer
Public Property Let a(ByVal valeur As Integer)
v1 = valeur
End Property
Public Property Get a() As Integer
a = v1
End Property
Public Property Let b(ByVal valeur As Integer)
v2 = valeur
End Property
Public Property Get b() As Integer
b = v2
End Property
2- votre code modifié
Sub main1()
Dim myT As New Collection
Dim t1 As New TA
With t1
.a = 1
.b = 2
End With
myT.Add t1
End Sub