Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms and Events

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

I have two forms: FormA and FormB.
In formA I create an instance of formB like this:

Private withevents frmB as FormB 'in the declare

Set frmB = new FormB

' Now, in formA I will have access to an FormB event

In formB

Event pass(byVal state as boolean)

' Somewhere in the form I will raise that event
RaiseEvent pass(True)


What happens is that, in FormA I will have access to FormB pass event ... In the other hand, vb will not give an error message when the debugger read the raise event statement.

However, despite the raise statement don´t give me any error, it will not "call" the procedure in formA that handles that event :(

Anyone knows why?

Sergio Oliveira
 
I think you may need a Public declaration for the Event in Formb

Public Event pass(byVal state as boolean)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top