|
-
Oct 15th, 2002, 09:56 AM
#1
Thread Starter
Member
form
hii
i want form show
but
i write form name in textbox and click the show button
how
thanks
-
Oct 15th, 2002, 09:59 AM
#2
Do you mean this?
VB Code:
Private MyForm As Form
Private Sub Command1_Click()
Set MyForm = Text1.Text
MyForm.Show
End Sub
-
Oct 15th, 2002, 10:00 AM
#3
Frenzied Member
VB Code:
Private Sub Command1_Click()
Dim frm as Form
For Each frm in Forms
if frm.Name = Text1.Text then frm.Show
Next
End Sub
Is this what you mean?
-
Oct 15th, 2002, 10:00 AM
#4
Code:
Select Case Text1.Text
Case "Form1"
Form1.Show
Case "Form2"
Form2.Show
End Select
-
Oct 15th, 2002, 10:03 AM
#5
Frenzied Member
Oops
Just noticed, Mine only works for loaded forms
-
Oct 15th, 2002, 10:14 AM
#6
Frenzied Member
Hack, your code will not work. You must assign a form object to object form. I know how to do this with controls. I don't think you can do this with forms unless they're loaded.
Don't anthropomorphize computers -- they hate it
-
Oct 15th, 2002, 10:31 AM
#7
VB Code:
Private Sub Command1_Click()
Dim frm As Form
Set frm = Forms.Add(txtFormName.Text)
frm.Show
End Sub
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Oct 15th, 2002, 10:38 AM
#8
Ah yes...
Originally posted by vbgladitor
Hack, your code will not work. You must assign a form object to object form. I know how to do this with controls. I don't think you can do this with forms unless they're loaded.
You are correct sir. Thats what I get for posting code I've written off the top of my head without testing it. In fact, the only code that has been posted so far that works on forms not yet loaded is Cander's.
Sorry for misleading you akyolfatih.
-
Oct 15th, 2002, 10:38 AM
#9
Frenzied Member
VB Code:
Private Sub Command1_Click()
Dim frm As Form
Set frm = Forms.Add(txtFormName.Text)
frm.Show
End Sub
Cool. I knew that. he he he :-)
Don't anthropomorphize computers -- they hate it
-
Oct 15th, 2002, 11:13 AM
#10
Very nice...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|