Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Julio,
What you have ought to work in theory, but I get the same error you do. It seems like the Dictionary object doesn't like late binding. If I set a reference to the Microsoft Scripting Runtime and change the code to use early binding as shown below it works as expected. Sub Macro1() Dim dic As Scripting.Dictionary Dim s As String Set dic = CreateObject("Scripting.Dictionary") dic.Add "foo", "bar" s = dic.Keys(0) End Sub -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "julio" wrote in message ... How do you access dictionary keys? What's wrong with this? (I get runtime error "let not defined, get doesn't return object" or the other way around) Sub Macro1() Dim dic As Object Dim s As String Set dic = CreateObject("Scripting.Dictionary") dic.Add "foo", "bar" s = dic.keys(0) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Customizing a dictionary | Excel Worksheet Functions | |||
How to remove a word from dictionary? | Excel Discussion (Misc queries) | |||
dictionary function | Excel Programming | |||
Dictionary Functions | Excel Programming | |||
Dictionary objet | Excel Programming |