Skip to content

Instantly share code, notes, and snippets.

@rikukissa
Created August 16, 2018 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rikukissa/dc9b0b598cec5132010b7dad6828bdcd to your computer and use it in GitHub Desktop.
Save rikukissa/dc9b0b598cec5132010b7dad6828bdcd to your computer and use it in GitHub Desktop.
Dictionary printer for Visual Basic
Function PrintDict(Dict as Dictionary, Optional ByVal Stack as String = "")
For Each Key In Dict.Keys()
If TypeOf Dict(Key) Is Dictionary Then
Debug.Print Stack & Key & ":"
PrintDict Dict(Key), Stack & " "
Else
Debug.Print Stack & Key & ": " & Dict(Key)
End If
Next
End Function
@rikukissa
Copy link
Author

Sure 👍 you can achieve the same with any Dict type just by modifying the code a bit. The basic idea of how the inputted Dict is looped through should be the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment