List of All Form/Module of the Project

Posted on 2006-06-08
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 48

    Assisted Solution

    by:Ryan Chong
    try read the content of vb project file (.vbp) physically ?
    LVL 8

    Accepted Solution

    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

    You have to create an Add-In project to list all the forms and modules.
    LVL 6

    Author Comment

    dear egl104

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

    LVL 8

    Expert Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    VBA Modification 5 35
    Excel VBA combine two working workbooks 8 32
    Windows 10 start screen issues 9 39
    MsgBox 2 28
    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    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…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now