Solved

Show form most than one time

Posted on 2004-08-04
5
236 Views
Last Modified: 2010-05-02
How can I show a Form for more than one time??

Form1.show

I want to show the same form for more time..


THanks!
0
Comment
Question by:leekf
5 Comments
 
LVL 5

Expert Comment

by:ZenMasterrr
Comment Utility
not sure what you mean, do you mean you want to duplicate ?
0
 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
...
Dim frm As New Form1
frm.show
...

?
0
 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
or

...
Dim frm As Form1
Set frm = New Form1
frm.show
...
0
 
LVL 3

Accepted Solution

by:
TILL earned 50 total points
Comment Utility
If you wish to show a form more than once, this meaning that you want to have multiple form instances active, you have to create and show multiple instances. You can do this by performing the following:

Dim frm1 as MyForm
Dim frm2 as MyForm
Set frm1=new MyForm
Set frm2=new MyForm
Load frm1
Load frm2
frm1.Show
frm2.Show
...
' Do something here
...
unload frm1
unload frm2
Set frm1=nothing
Set frm2=nothing


The code from above displays 2 forms for a while (while that something is performing) and after that it closes both form instances and releases all the resources.
If you need more directions, please feel free to ask.

Regards,
TILL
0
 
LVL 18

Expert Comment

by:JR2003
Comment Utility
Private Sub Command1_Click()

    ShowMyForm
    ShowMyForm

End Sub

Private Sub ShowMyForm()

    Dim f as frmMyForm
    Set f = New frmMyForm
    f.Show

End Sub
0

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

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

771 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

11 Experts available now in Live!

Get 1:1 Help Now