|
-
Jun 26th, 2002, 07:52 PM
#1
Thread Starter
Registered User
creating forms using strings
anyone know a way to create a form based on a string?
eg.
Private Sub Command1_Click()
Dim f As Form
Set f = CreateObject(App.Name & ".form2")
f.Show
End Sub
I want this to be dynamic so that the same code will create different forms under different circumstances without a long winded if then statement like this:
if integer = 1 then
set form = new form1
else if integer = 2 then
set form = new form2
elseif integer = 3 then
set form = new form3
else
set form = new form4
end if
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
|