Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

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.
0
Vadimka
Asked:
Vadimka
1 Solution
 
TimCotteeHead of Software ServicesCommented:
Set form1 = Forms.Add(strName)

Will open the form referenced in strName and assign the object to the form1.
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.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now