Thread: dictionary keys
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Julio Julio is offline
external usenet poster
 
Posts: 19
Default dictionary keys

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