Solved

Set statement

Posted on 1998-12-07
2
125 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 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending a email via excel using vba 6 117
Hide vba in gp 7 127
VB6 - Scroll Mouse wheel on Picturebox 13 119
VBA: loop recent folder and copy txt file. 8 56
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

732 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