1

in this line,

'Dictionary is included in the reference "Microsoft Scripting Runtime" in a working project that already has that reference:
Dim myVar as Dictionary 

How can I locate which library it references to, without googling it ? In this case, without knowing that Dictionary is included in "Microsoft Scripting Runtime", how could I have guessed it ?

Thanks !

Roger
  • 333
  • 2
  • 13
  • If the reference is added, you can find the library as @QHarr shows in his answer. If not, there is no way to receive such information without Googling. But there are cases when a variable can be found in two or more libraries, like the case of `Dictionary` may be. If you also have a reference to 'Microsoft Word ... Object Library', you may have a surprise trying to declare it as `Dim myVar As Dictionary`. You should declare it `Dim myVar As Scripting.Dictionary`. If declaring as you tried does not return a variable to be used as you need, press F2 and see what other library may be in conflict – FaneDuru Feb 12 '21 at 10:36

1 Answers1

1

As the reference is already added you can search all libraries, or a specific library, using the object browser F2 within the VBE.

Open the object browser, select all/single library, enter your search term, hit the binoculars and review search results.

See image below:

QHarr
  • 83,427
  • 12
  • 54
  • 101