Controlling Execution Flow

Controlling Execution Flow

How do you command a button to go to another form, I put like follows:

Sub Double_Click ( ) GoTo form2   EndEnd Sub
Sub Double_Click ( ) Load form2   EndEnd Sub
BUT NONE OF THESE WORK! How do I just command it to go to another form? Can You Help:)

The Show routine is what you are looking for. You can’t really force what happens in a Windows application; however, by showing a form, you can push the user down a new path. Just say Form2.Show and the window will be loaded into memory and shown to the user. If you say Form2.Show 1 (number 1) the form will be shown modally, which means that the user has to do something to close the window before he can continue. Take a look at the help for the Show routine for more information.

See also  11 Effective Keyword Research Tools and Techniques

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist