Solved

RaiseEvent Question

Posted on 2000-04-04
2
353 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 70

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA to copy paste columns form one file to other 20 100
Computer crashes, following error message in event manager 5 278
How to debug this code 7 65
Copy a row 12 69
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…

749 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