Events 
Author Message
 Events

Hi,

i'm a newbie to vb and i would like to know how i can use custom events in
my class modules. Some examples would be great!

Robert



Mon, 01 Jul 2002 03:00:00 GMT  
 Events
Zonnet,

Assumed working in a class, here are two event examples, one with a
parameter and one without:
=============================================
'clsWhatever
Option Explicit

Public Event MyEventWithParameter( bWhatever As Boolean)
Public Event MyFunctionFinished()

Public Sub MySub()
    ' do stuff

    ' done doing stuff, raise event
    RaiseEvent MyEventWithParameter(True)

End Sub

Public Sub MyFunction() As String
    ' do stuff
    MyFunction = "Done Doing Stuff"

    ' done doing stuff, raise event
    RaiseEvent MyFunctionFinished
End Sub
=======================================

HTH,
Brian A. Manlove
Magenic Technologies Int'l.


Quote:
> Hi,

> i'm a newbie to vb and i would like to know how i can use custom events in
> my class modules. Some examples would be great!

> Robert



Mon, 01 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Events, Events, alas, wherefore art thou events...

2. Events, Events, alas, wherefore art thou events...

3. Events, Events, alas, wherefore art thou events...

4. Control Event Problem (Post Event after an event is fired)

5. object created in workbook_open event handler disappears on exit from the event handler

6. Excel events (need shutdown event)???

7. ItemChange event firing off after ItemAdd event

8. Changing non-recurring events to yearly recurring events

9. How do you write a events thats is call before the item_remove events from Outlook

10. SelectionAdded event vs. ShapeAdded event

11. Event before Terminate event?

12. Major bug with Interface Events and Shared Events

 

 
Powered by phpBB® Forum Software