Show form most than one time

How can I show a Form for more than one time??

Form1.show

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


THanks!
LVL 2
leekfAsked:
Who is Participating?
 
TILLConnect With a Mentor Commented:
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
 
ZenMasterrrCommented:
not sure what you mean, do you mean you want to duplicate ?
0
 
Ryan ChongCommented:
...
Dim frm As New Form1
frm.show
...

?
0
 
Ryan ChongCommented:
or

...
Dim frm As Form1
Set frm = New Form1
frm.show
...
0
 
JR2003Commented:
Private Sub Command1_Click()

    ShowMyForm
    ShowMyForm

End Sub

Private Sub ShowMyForm()

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

End Sub
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.