All open projects

T

Todd Huttenstine

Hey guys

I need to list all of my open projects. What is the code
for this?


Thank you

Todd Huttenstine
 
T

Tom Ogilvy

You must have missed it:

Before using these procedures, you'll need to set a reference in VBA to the
VBA Extensibility library. In the VBA editor, go to the Tools menu, choose
the References item, and put a check next to "Microsoft Visual Basic For
Applications Extensibility" library. This enables VBA to find the
definitions of these objects.


After you create the reference, go to the object browse and restrict the
search to VBIDE

search on Project

at the bottom you will see

VBE VBE Projects

click on that and hit F1

from help:

Returns the VBProjects collection, which represents all of the projects
currently open in the Visual Basic IDE.



--

Regards,

Tom Ogilvy
 
C

Chip Pearson

Todd,

Try something like

Dim VBProj As VBIDE.VBProject
For Each VBProj In Application.VBE.VBProjects
Debug.Print VBProj.Name
Next VBProj


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Top