Is there anyway to programmatically alter the VBA Project Explorer?
The only tool that I've seen do this is MZ Tools, an IDE Addin, which
has the ability to Collapse all projects such that no modules are
visible in the treeview, only the root-level objects (the projects).
If you group modules by type, it will collapse down to the group level
such that you see all projects and their immediate sub-nodes like
"Microsoft Excel Objects","Modules",etc.
Does anyone know how MZTools does this?
The Microsoft Visual Basic for Applications Extensibility library
provides the object model for the VBIDE, allowing us to add menu items
to the Project Explorer popup. It doesn't, however, provide the
granularity of which nodes in the treeview are expanded. So, I guess
that MZTools uses the object model to get the window handle and Windows
API calls to find the handle of the TreeView and collapse the nodes.
Regards
Stephen Bullen
Microsoft MVP - Excel
Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev