Option Explicit
Dim d1 As Dictionary, d2 As Dictionary
Sub essai_dict()
Dim i As Byte
Set d1 = New Dictionary
Set d2 = New Dictionary
For i = 1 To 10
d1(i) = ""
Next i
d2(2) = 2: d2(6) = 6
MsgBox "d1.Keys : " & Join(d1.Keys, ", ") _
& vbLf & "d2.Keys : " & Join(d2.Keys, ", ")
End Sub
Sub Remove_item()
Dim k
For Each k In d2.Keys
d1.Remove k
Next k
MsgBox "d1.Keys : " & Join(d1.Keys, ", ") _
& vbLf & "d2.Keys : " & Join(d2.Keys, ", ")
End Sub