How to Show Hidden Items in the VBA Object Browser

One possible fix for the "Cannot jump to '|' because it is hidden" error is to show hidden members in the VBA object browser.

How to Show Hidden Items in the VBA Object Browser

The Problem

One of my junior developers got the following error message when trying to go the definition of the VBA Array() function:

Cannot jump to 'Array' because it is hidden.
Error message, "Cannot jump to 'Array' because it is hidden"
Error, "Cannot jump to 'Array' because it is hidden."

The Solution

I followed up with this answer:

It's a part of the VBA standard library's _HiddenModule, which is hidden by default.  You can display hidden members by right-clicking in the Object Browser window and checking the box to show hidden members:

As for why the Array() function is tucked away in the _HiddenModule...I have no idea.  

The Master: Stephen Lebans

I first learned about the "Show Hidden Members" setting from Access legend Stephen Lebans, when I was trying to sink events to report sections.  

Here's a sample of Stephen's code that I ended up incorporating into one of my event-handling class modules:

Private WithEvents mSection As Access.[_SectionInReport]
Private WithEvents mSectionPageHeader As Access.[_PageHdrFtrInReport]
Private WithEvents mSectionPageFooter As Access.[_PageHdrFtrInReport]
Note the square brackets around the otherwise illegal object identifier (VBA identifiers are not allowed to start with an underscore character).

As Stephen says in the linked forum post, "you never know what you might find" when you start looking through an object's hidden members.

Stephen is one sly dog.


Addendum

Below is a copy of the original exchange I had with one of my developers.

If you're curious, the app we are using is Keybase, which I highly recommend.

Image by Åsa K from Pixabay

All original code samples by Mike Wolfe are licensed under CC BY 4.0