PDA

View Full Version : Solved: Dictionary help required



cunnus88
06-29-2005, 03:06 AM
Whaddaya know? My third thread starter in one week. Thanks for all the help, people.

This time, I'm having trouble declaring a Dictionary object.

I've seen the code in other forums and it goes something like:

dim mydictionary as new dictionary

Well, whenever I do that, I get the literal dictionary (you know, the one with entries and definitions and pronunciation keys?).

I did include a reference to Microsoft Scripting Runtime Library so why I should be stuck with a lexicon is beyond me.

Any takers?

Killian
06-29-2005, 05:16 AM
Having added a reference to Microsoft Scripting Runtime Library, you need to make you declaration from that object:
Dim mydictionary As New Scripting.Dictionary

Dim mydictionary As New Dictionary creates a new dictionary item in Word's Dictionaries collection (of custom dictionaries), hence the confusion

MOS MASTER
06-29-2005, 10:23 AM
Hi Cunny, :yes

Glad to see VBAX can help you.
Would you be so kind to reply to your previous post or mark it solved if it has been?

Seams to me Killian is spot on whit his answer. If you need more detail please howler..:whistle: