top of page
  • John

Improving the VBE's Intellisense 'auto list members' popup

Updated: Jun 26

Improving what? You know, this:

The 'auto list members' popup
The 'auto list members' popup

It's shown, typically, when you type a '.' following the name of a declaration that has child-members … for example, following the name of a Module in your VBA Project then you will see a list of the (non-Private) members of that Module; or following the name of an object such as a Workbook (as in the screen-snippet, above) then typing a '.' will show you the (non-Private and ... by default ... non-hidden) members of that object.


The big downside of the VBE's dialog is that it's not very user-friendly:

 

  • It's very small

  • It's not searchable

  • It shows the name of the member (and the type as an icon) only

  • When you display the dialog without a parent (i.e. without a '.' … by pressing Ctrl + J or using the 'Edit' > 'List Properties / Methods' menu item) then every available member is displayed in one big 'flat hierarchy' list (including members from within your VBA Project as well as members from each Type Library that your Project has a Project reference to)


The 'Show All Members' function of VBE_Extras which is triggered, by default, by pressing Ctrl + . (whereas the VBE's 'auto list members' popup is triggered by pressing just .) is designed to fix this by displaying an improved dialog that:


  • Is much larger (and can be re-sized)

  • Is searchable and filterable by member-type

  • Shows not only the name of the member (and the type as an icon) but also its full 'signature'

  • When you display the dialog without a parent (i.e. by pressing Ctrl + . or using the 'Extras' > 'Show All Members' menu item while the cursor is in 'whitespace') then every available top-level member is displayed (including members from within your VBA Project as well as members from each Type Library that your Project has a Project reference to) … but if you prefer the VBE-style 'flat hierarchy' then you can enable this with "Allow 'flat hierarchy'" in the 'Code' tab of the VBE_Extras Settings

  • Allows you to just copy (rather than insert) the name of the member if you prefer

  • If the member is a Constant or an Enum member from within a Type Library, then you can optionally insert or copy the value (rather than the name) of the Constant or Enum member … this is useful if using late binding or special binding (when 'copy value' is available, the 'Copy' and/or 'Insert' buttons of the Show All Members dialog will automatically become 'split buttons' allowing the value to be copied or inserted)

  • If the member has a 'doc string' then it will be shown to you if you hover the mouse pointer over the member (and if the 'Show doc string' option is selected in the Options for the Show All Members dialog) … this includes 'doc strings' defined:

    • In your VBA code … if you include lines with code comments immediately above, say, a procedure then those comments will be shown

    • In Type Libraries … though note that not all Type Libraries define 'doc strings' for their members … to see this in action for a Type Library, display the Show All Members dialog for an object in the Microsoft Scripting Runtime Type Library (e.g. the FileSystemObject or the Dictionary) as the Microsoft Scripting Runtime Type Library does define 'doc strings'

The 'Show All Members' dialog
The 'Show All Members' dialog

The Show All Members dialog can be shown in the following 'contexts'

 

  • In whitespace … as noted above, all top-level members are shown (unless you have checked "Allow 'flat hierarchy'" in the 'Code' tab of the VBE_Extras Settings

  • Following a member … all child members of that member are shown (see "The 'Show All Members' dialog" image above showing all child members of Excel's Workbook object)

  • Following a comparator (=, <, >, <=, >=, <>) which follows the name of a variable (or Function, Property Get etc) which has the value type of an Enum (either an Enum defined in your VBA code or an Enum defined in a Type Library) … see the "Enum members" image, below, where Ctrl + . has been pressed with the cursor following the '='

Enum members
Enum members
  • Following an assignment operator (=) where the variable (or Property Get) being assigned to is declared with the value type of an Enum (again, either an Enum defined in your VBA code or an Enum defined in a Type Library) … similar to the image, above, for comparators

  • When passing an argument to a procedure or property and the respective parameter requires an Enum member … see the "Enum members as argument" image, below, where Ctrl + . has been pressed with the cursor following 'filename,'

Enum members as argument
Enum members as argument

Things to know about 'Show All Members'


If a member (or parameter etc) is declared as a Variant or Object then Show All Members cannot show any members in the same way as the VBE's 'auto list members' popup cannot. Showing members depends on the explicit type being used. This requirement applies when showing members for declarations in your VBA code and when showing members for declarations in Type Libraries … and I'm afraid that some Type Libraries declare far too many things as Variant … stand up, Excel!

 

Show All Members doesn't work for the 'Debug' object (i.e. as in Debug.Print or Debug.Assert) as Debug is not actually part of a Type Library, being built into the VBE itself.

 

As noted above, Show All Members uses a true hierarchy (not a 'flat hierarchy'). This means that for members of Modules and Enumerations, Show All Members considers those members not to be 'top level' … whereas the VBE does consider them to be 'top level'. For example, VBE's Err keyword is a Function within the Information Module of the VBA Library. If you type Err in the VBE, place the cursor after it and then press Ctrl + . you will not see a list of members, rather you will see a dialog telling you that Err isn't accessible. This is because Err is not 'top level'. If you use VBE_Extras 'Qualify reference' function on Err, it will offer to prefix it with VBA.Information. You can then press Ctrl + . and see its members.

 

If there are multiple members with the same name (e.g. a Property Get and a Let and/or Set) then they will each be shown in the Show All Members dialog whereas the VBE would just show one.

 

If you Show All Members in whitespace with the "Allow 'flat hierarchy'" setting unchecked (the default), then the list of members shown to you will consist of:

  • Type Library program names (those that your VBA Project has Project References to, plus any that are referenced via special binding)

  • VBA Project names (for the active VBA Project and any that your VBA Project has Project References to)

  • Modules names in the active VBA Project (Classes only if they have their VB_PredeclaredId Attribute set to True … if you're not sure what Attributes are, see my VBA Attributes post)

  • Enum names in the active VBA Project

  • Module-level declarations in the Module that is being shown

  • Procedure-level declarations in the procedure or property that the cursor is in


The Show All Members dialog will show hidden members if the relevant setting (in the Object Browser, right click on any Member and select 'Show Hidden Members', or use the VBE_Extras function of the same name in the main menu) is switched on.

Comments


bottom of page