[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

Open A Form

I have wrote a program and it has two forms:
1. Form1
2. Tang1
I want to make a button on Form1 that when it is pressed it will open Tang1. What code would I use ?

My e-mail is: claym@usa.com
0
claym
Asked:
claym
  • 3
1 Solution
 
tampabay420Commented:
Form1.Show
0
 
tampabay420Commented:
Show Method
         

Displays a UserForm object.

Syntax

[object.]Show modal

The Show method syntax has these parts:

Part Description
object Optional. An object expression that evaluates to an object in the Applies To list. If object is omitted, the UserForm associated with the active UserForm module is assumed to be object.
modal Optional. Boolean value that determines if the UserForm is modal or modeless.  



Settings

The settings for modal are:

Constant Value Description
vbModal 1 UserForm is modal. Default.
vbModeless 0 UserForm is modeless.



Remarks

If the specified object isn't loaded when the Show method is invoked, Visual Basic automatically loads it.

Note In Microsoft Office 97, if a UserForm is set to display as modeless, it causes a run-time error; Office 97 UserForms are always modal.

When a UserForm is modeless, subsequent code is executed as it's encountered. Modeless forms do not appear in the task bar and are not in the window tab order.

Note You may lose data associated with a modeless UserForm if you make a change to the UserForm project that causes it to recompile, for example, removing a code module.

When a UserForm is modal, the user must respond before using any other part of the application. No subsequent code is executed until the UserForm is hidden or unloaded. Although other forms in the application are disabled when a UserForm is displayed, other applications are not.
0
 
claymAuthor Commented:
This is a Visual Basic 6 program !
0
 
tampabay420Commented:
yeah, but i only have the MSDN for office products... i thought [posting out of the help file would help?
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now