Solved

Set statement

Posted on 1998-12-07
2
120 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
2 Comments
 
LVL 13

Accepted Solution

by:
Mirkwood earned 50 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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