List of All Form/Module of the Project

How I get all form name or module name in a list box within a project
LVL 6
AHMKC1Asked:
Who is Participating?
 
List244Connect With a Mentor Commented:
You really can't do this.  You could loop through:

dim SomeForm as form
for each form in forms
  list1.additem Form.Name
next

But that will only add forms that are loaded.

You could read the VBP file as RyanCYS has said, but I don't know of anyone that ships a program with the VBP file.
If you are going to do that, you are better off opening the VBP and copying all the forms and modules into a text
file which then can be used for the same purpose.  Only with your own text file it is a little easier to handle the
loading since you pick the formatting.

So really the only way you can know all your forms and modules is if you have them stored somewhere.
0
 
Ryan ChongConnect With a Mentor Commented:
try read the content of vb project file (.vbp) physically ?
0
 
nffvrxqgrcfqvvcCommented:
You have to create an Add-In project to list all the forms and modules.
0
 
AHMKC1Author Commented:
dear egl104

Please explain me how i do this by an add-In project

Thanks
0
 
List244Commented:
AHMKC1, what EQL is telling you is much like what Ryan has told you.  It will only work at design-time.
You will not be able to read this information in a completed project.  An add-in would be an add-in to VB.
Which means you would really just have an additional reader of forms and modules... Visual Basic itself
will already tell you this information.. at design-time.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.