Skip to content

Instantly share code, notes, and snippets.

@ezhov-da
Last active March 10, 2019 12:18
Show Gist options
  • Save ezhov-da/e543e74ab24ed19dd2b1f758bb05576e to your computer and use it in GitHub Desktop.
Save ezhov-da/e543e74ab24ed19dd2b1f758bb05576e to your computer and use it in GitHub Desktop.
vba dictionary
'http://perfect-excel.ru/publ/excel/makrosy_i_programmy_vba/ischerpyvajushhee_opisanie_obekta_dictionary/7-1-0-101
'Set a reference to MS Scripting runtime ('Microsoft Scripting Runtime')
'Set dict = CreateObject("Scripting.Dictionary")
'or
'Dim dict As New Scripting.Dictionary
'Example of use:
If Not dict.Exists(key) Then
dict.Add key, value
End If
'Don't forget to set the dictionary to Nothing when you have finished using it.
Set dict = Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment