Solved

RaiseEvent Question

Posted on 2000-04-04
2
325 Views
Last Modified: 2010-05-02
I am creating a form from another form by doing the following:
-------------------------------------
Private WithEvents newForm as Form
Set newform = New form_myForm
-------------------------------------


Then in my form_myform that is getting instanced it has the following:
-------------------------------------
Public Event myEvent
...
...
...
RaiseEvent myEvent
-------------------------------------

But my form that created the instance only sees the intrinsic events associated with the Form object not those that i have declared in form_myForm.

So if youhave any suggestions to how I could make my calling form receive events raised in the instanced form that would be great.
0
Comment
Question by:sp3317
2 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 2685269
In the Object List on your first form code editor, you should see "NewForm". Once choosen, you should see your event (and not the intrinsic events).

Also, your declaration must be done this way:
Private WithEvents newForm as form_myForm
0
 

Author Comment

by:sp3317
ID: 2685301
Can't belive i missed that one. Thanks for the help!

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

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

13 Experts available now in Live!

Get 1:1 Help Now