Casting String to Form

I have names of my forms in the string variables.
How can I put them to the form variables.
For example:

Dim form1 as Form
Dim strName as String
strName="NameOfTheForm"

How can I do this :
Set form1=strName  ???? This is not right
Thanks.
VadimkaAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
TimCotteeConnect With a Mentor Commented:
Set form1 = Forms.Add(strName)

Will open the form referenced in strName and assign the object to the form1.
0
All Courses

From novice to tech pro — start learning today.