Opening one form from another

Posted on 2007-08-02
Last Modified: 2013-12-26
In VB 2005 express how can i open one form (form2) from another form (form1) when i click on a button (button1). I have try to use show but it keeps giving me errors.
Thank you.
Question by:jodyreid
    LVL 14

    Expert Comment

    Are you trying to open another aspx page from one aspx page ?
    If that is what you want see this.

    hope it helps.

    Author Comment

    No i have a project started in Visual basic 2005 express. I have a form opened and on this form i have a button that when clicked will open another form. The first form will have about 6 buttons when finished all opening different forms.
    Thank you.
    LVL 14

    Expert Comment

    Ok good.


    Add this to your button. Basically this javascript will open a page mentioned.
    LVL 14

    Expert Comment

    I forgot to refer you the link.
    LVL 14

    Expert Comment

    LVL 85

    Accepted Solution

    Is this a WinForms app?

    If so, just:


    Or, if you want a new form to show up each time:
        Dim f2 As New Form2

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
    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…

    761 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

    12 Experts available now in Live!

    Get 1:1 Help Now