1

I have a VBA project in Excel, without a reference to VBIDE, but I'm aware that the Excel Type Library has an importlib statement in the MIDL:

// TLib :     // TLib : Microsoft Visual Basic for Applications Extensibility 5.3 : {0002E157-0000-0000-C000-000000000046}
importlib("VBE6EXT.OLB");

I do get Intellisense as I type Application.VBE, such that I can construct the following statement using Intellisense:

Application.VBE.VBProjects.Count

But I can't view the definition of VBE in the Object Browser, as the Object Browser doesn't see VBIDE as being explicitly referenced.

Given the importlib MIDL statement, and the Intellisense autocompletion, I'm inclined to believe that a call to Application.VBE.VBProjects.Count is early bound.

Is the VBE implicitly resolving the importlib reference to VBIDE, even though it isn't referenced directly, or are all of these calls really late-bound?

ThunderFrame
  • 9,352
  • 2
  • 29
  • 60
  • 1
    It should be noted that if one tries to use a VBIDE constant or enum, one will get the dialog from VBIDE saying the symbols are missing and prompting whether to add the library to the references. If it were early bound the usual way, one'd expect constants and enums to work. In fact, you even get Intellisense listing the enums/constants *before* the dialog which comes only when you actually auto-complete the selection of a constant/enum. Those quirks led me to think there's something magical going in the background but I'm not sure what. – this Sep 18 '17 at 08:51

0 Answers0