|
-
October 2nd, 1999, 02:43 AM
#1
URGENT : Loading forms using formnames in strings
Is it possible to load using a formname in a string variable
For eg.,
<vbcode>
strFormName = "Form1"
Load strFormName
</vbcode>
Please send me a solution for this !!
-
October 2nd, 1999, 08:39 AM
#2
Re: URGENT : Loading forms using formnames in strings
Here it is. Without SP3 for VB6, it won't work when compiled.
private Sub Form_Click()
Dim x as Form
set x = Forms.Add("Form2")
x.Show
End Sub
' or
private Sub Form_Click()
Forms.Add("Form2").Show
End Sub
' or
private Sub Form_Click()
Dim x as Form
set x = CallByName(Forms, "Add", VbMethod, "Form2")
x.Show
End Sub
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
|