?
Solved

Instantiating Class Objects WithEvents at runtime?

Posted on 2003-03-17
10
Medium Priority
?
207 Views
Last Modified: 2013-11-25
HI,

I have a class that exposes events. Is it possible to dynamically instantiate more than 1 instance of this object (with events) at runtime from an app?
I tried going down the line of creating a collection of the class, but I then can't access the individual objects' events.

any ideas?

Ta
0
Comment
Question by:CD-Softy
[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
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 500 total points
ID: 8154865
Sample here found in ObjArrays.zip that contains two methods to achieve this:

http://www.mvps.org/vb/index2.html?samples.htm
0
 

Expert Comment

by:CleanupPing
ID: 8532160
Hi CD-Softy,
This old question (QID 20553864) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
LVL 2

Author Comment

by:CD-Softy
ID: 8535453
Moderators please refund and close this Q

I have not found an acceptable answer for this post.
0
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!

 
LVL 28

Expert Comment

by:AzraSound
ID: 8535639
What was wrong with the solution I presented?
0
 
LVL 2

Author Comment

by:CD-Softy
ID: 8559253
Please accept my apologies, I have reviewed the statement I made and decided it was unfair to you that I don't give you at least some points for your effort. The reason I can't accept your answer is that my scenario doesn't allow me to use arrays of objects or even collections - sorry. But I thank you for your effort anyway.

MODERATORS - please award AzraSound 25 points of this thread and refund me the rest. Thanx.
0
 

Expert Comment

by:CleanupPing
ID: 8899999
CD-Softy:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 8902111
According to the questioner's last post:

>>MODERATORS - please award AzraSound 25 points of this thread and refund me the rest. Thanx.
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 8957080
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->Accept AzraSound's comments as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 8957100
AzraSound

I'm just blasting away my appointed chunk of cleanup space, that's naturally a generic post.  I made a program to help me speed up posting and logging in one shot, so its just easier to include these all together.  You can wait another few days, right?

CD-Softy
Moderators don't usually enter threads, you have to post requests in CS to get their attention.
I recommend posting a message in community service linking to this question with a request to reduce the point load to 25, then you can award them to AzraSound yourself.  If you do this before the deadline, you will be able to keep your 100 points, and close the question.

Your decision has been made, I am providing you the way to have it carried out...


0
 
LVL 28

Expert Comment

by:AzraSound
ID: 8957996
GPrentice00,
Completely understandable.  I have no problem waiting.
0

Featured Post

Technology Partners: 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
Suggested Courses
Course of the Month8 days, 16 hours left to enroll

764 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