Programmatically alter the Project Explorer

R

R Avery

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?


http://www.mztools.com/v3/features.htm
 
S

Stephen Bullen

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
 
C

Carlos J. Quintero [.NET MVP]

Stephen Bullen said:
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.

Correct.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top