Solved

Casting String to Form

Posted on 2002-07-10
1
128 Views
Last Modified: 2010-05-02
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
Comment
Question by:Vadimka
1 Comment
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
ID: 7143740
Set form1 = Forms.Add(strName)

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now