in the VBE, Tools=>References, scroll down through the list until you see
Microsoft Scripting Runtime.
Click the checkbox and the click OK.
You should then see scripting in the object browser.
or use late binding (no reference required)
Sub Tester1()
Dim dic As Object
Set dic = CreateObject("Scripting.Dictionary")
dic.Add "ABCD", "Item1"
dic.Add "ABCE", "Item2"
MsgBox dic.Item("ABCD")
End Sub
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.