Results 1 to 2 of 2

Thread: Question about CLASS MODULES

  1. #1

    Thread Starter
    Lively Member ExciteMouse's Avatar
    Join Date
    Jul 2000
    Location
    Dallas, TX
    Posts
    78
    i have seen this done some where before.

    I have a class module in my project named "Class1".
    I want to have a PUBLIC EVENT that can be raised
    from the main form.

    so in the class module i have this:

    Public event TESTEVENT(param1 as long)

    ---
    now in the main form i have this:

    dim MyClassMod as new Class1

    how do i make it so when i raise the event in the class:
    RaiseEvent TESTEVENT(12345)

    it will call the raised event in the main form?

    i know it has something to do with a "Friend" call
    but i forgot how =(
    thanks in advance

  2. #2

    Thread Starter
    Lively Member ExciteMouse's Avatar
    Join Date
    Jul 2000
    Location
    Dallas, TX
    Posts
    78

    Talking

    nevermind
    i figured it out.

    if you have a class module and you want to raise events

    put this in the object:


    private WithEvents CLASSNAME as CLASSMODULE


    remember "WithEvents"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width