Answers for "vba dictionnary"

VBA
1

vba dictionnary

Dim myDict As New Scripting.Dictionary
Dim key As Variant
With myDict
    .Add key:="Sarah", Item:=50
    .Add "John", 10
    Debug.Print .Item("Sarah")       ' 50
    If .Exists("John") Then
        Debug.Print .Item("John")    ' 10
    End If
    For Each key In .Keys
        Debug.Print key, .Item(key)  ' Sarah 50    John 10
    Next key
    .Remove ("John")
End With
Posted by: Guest on February-07-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language