ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA question - Set reference to run Scripting.Dictionary (https://www.excelbanter.com/excel-programming/295403-vba-question-set-reference-run-scripting-dictionary.html)

ajliaks[_12_]

VBA question - Set reference to run Scripting.Dictionary
 
Hi

How do I set a reference to MS Scripting runtime in order to run
Scripting.Dictionary

Thanks

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

VBA question - Set reference to run Scripting.Dictionary
 
Go in to the VBE. Select ToolsReferences menu, and in the list box look for
an item called 'Windows Scripting Runtime, and check that item.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ajliaks " wrote in message
...
Hi

How do I set a reference to MS Scripting runtime in order to run a
Scripting.Dictionary

Thanks.


---
Message posted from http://www.ExcelForum.com/




Tom Ogilvy

VBA question - Set reference to run Scripting.Dictionary
 
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

--
Regards,
Tom Ogilvy


"ajliaks " wrote in message
...
Hi

How do I set a reference to MS Scripting runtime in order to run a
Scripting.Dictionary

Thanks.


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 11:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com