Dictionnaire de dictionnaire
Sub DictionnaireDictionnaire()
'Microsoft scripting runtime est coché
Dim d1 As New Scripting.Dictionary
Dim d2 As New Scripting.Dictionary
Dim dd As New Scripting.Dictionary ' dictionnaire de dictionnaire
Dim Ptr As New Scripting.Dictionary
d1.Add "aa", 11: d1.Add "bb", 22
d2.Add "cc", 33: d2.Add "dd", 44
Set dd("dico1") = d1: Set dd("dico2") = d2
Set Ptr = dd("dico1")
MsgBox Ptr.Items(1): MsgBox Ptr("bb") ' affiche 22
Set Ptr = dd("dico2")
MsgBox Ptr.Items(1): MsgBox Ptr("dd") ' affiche 44
End Sub