Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scripting.dictionary questions 1

Status
Not open for further replies.

formerTexan

Programmer
Apr 10, 2004
504
US
A couple of miscellaneous questions.

1. I am curious as to why I can create a Scripting object (dictionary) in VBA without having the Scripting library installed. Any other Scripting methods and properties are unavailable other than those specifically associated with the dictionary. Is this perhaps because the dictionary is created by explicitly declaring it as a scripting object?

2. I have been unable to pass a dictionary object out of a function in the following fashion. Error 91 is raised. Again this is without the Scripting library installed. Is my only alternative for referencing objDictionary going to be to declare objDictionary as a public variable?

Private Function Whatever() as object 'or as variant
Dim objDictionary as object
Set objDictionary as Create(SCripting.Dictionary
...
...

Whatever = objDictionary
End Function


Thanks,
Bill
 
1) With late binding you don't need to reference the library
2) [!]Set [/!]Whatever = objDictionary

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
THank you PHV. As always, you are on the mark and I have had a fine time catching up on late binding vs early binding.

Cheers,
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top