Creating and Loading a form

I have been coding so, I will just get to the point. Here is my code:

Dim X as Form

X.Show

I get Run-Time Error 91, Object or Variable not set. How can I get this to work, code would help.
LVL 2
LinkyAsked:
Who is Participating?
 
xSinbadConnect With a Mentor Commented:
you have to set the form name;


Dim X as Form
set x = Form1
X.Show

0
 
nahumdCommented:
Or :
Dim X as new Form1
x.show
0
 
LinkyAuthor Commented:
Both of those do not work. xSinbad, I get Object required (Error 424). And nahumd, you have a good method but that is not what I was looking for. Thanks though.
0
 
LinkyAuthor Commented:
I fixed it. Thanks for your help.
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.