?
Solved

RaiseEvent Question

Posted on 2000-04-04
2
Medium Priority
?
366 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
[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 70

Accepted Solution

by:
Éric Moreau earned 200 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
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…
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

770 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