?
Solved

Set statement

Posted on 1998-12-07
2
Medium Priority
?
127 Views
Last Modified: 2010-05-03
Hi,

what is best solution to solve this "problem":
-let's say you have a toolbar with some buttons on it
-let's say you have few  ActiveX DLL's (each of them shows one form... for example)

Now, is there a way to create reference to it with Set <MyObject> = New <ClassName>
where MyObject and ClassName are strings read from pushed button's tag or description field? (for example)
I would like to automate all this, so i don't have  to write too many IF's.
I would like that "Set MyObject = New ClassName"  is build from strings and then executed?
Is there any way to do it? or is there any other better way of doing it?

Thanks already for your answers,
-Peter
0
Comment
Question by:hpet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
Mirkwood earned 200 total points
ID: 1448462
Set myObject = CreateObject ("projname.classname")

Where projname is your project name and classname is your class name.

Similar to
Set myObject =  new projname.classname

0
 
LVL 1

Author Comment

by:hpet
ID: 1448463
Thanks

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

765 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