Esteemed Forum Participants and Lurkers:
===============================
Excel 2003, Microsoft Runtime Scripting Library
I can't figure out what the proper "Type" is for Dictionary Keys. The following code runs without Option Explicit, but how do I "Dim" a key variable so that I can turn Explicit back on?Thank you for any and all suggestions, comments, and assistance.Code:Sub junk() 'Dictionary requires Microsoft Scripting Runtime in the "Tools > References" List Dim aList As Dictionary Dim aKey ' As ???????? '<< What is proper Type? Set aList = New Scripting.Dictionary aList.Add "Magic", "Treasure" For Each aKey In aList.Keys Debug.Print aKey, aList.Item(aKey) Next End Sub




Reply With Quote