Learn how to a build a cloud-first strategyRegister Now


List of All Form/Module of the Project

Posted on 2006-06-08
Medium Priority
Last Modified: 2010-04-07
How I get all form name or module name in a list box within a project
Question by:AHMKC1
LVL 54

Assisted Solution

by:Ryan Chong
Ryan Chong earned 120 total points
ID: 16862990
try read the content of vb project file (.vbp) physically ?

Accepted Solution

List244 earned 180 total points
ID: 16863641
You really can't do this.  You could loop through:

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

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.
LVL 29

Expert Comment

ID: 16869003
You have to create an Add-In project to list all the forms and modules.

Author Comment

ID: 16990757
dear egl104

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


Expert Comment

ID: 16992464
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.

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question