Results 1 to 5 of 5

Thread: Creating events

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633

    Post

    Hello!

    Does anyone know how to create an event and automatically all of my 43 forms use it? I don't know if this is possible but I know it has to deal with Class Module.

    On the same subject, is there a way where I can add some additional code (such as me.caption ="HI") to the RESIZE event and all forms in the project will process this code. The long way would be going through each form and add this code to the RESIZE event.

    I appreciate your time and help!!

  2. #2
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386

    Post

    Automatically not, but you can use something like:
    in a code module:
    Public Sub FormResize(frm As Form)
    ' do something
    frm.Caption = "Resizing now"
    End Sub

    and in all form_resize events:
    Call FormResize(Me)

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633

    Post

    Thanks Crazy D!

    Before posting my first message, I have been using the method that you posted. I was actually looking for a method to have all forms reference to an EVENT I created. Something like an add on. I don't really find it to be efficient to go through each form and code in each event.

    But thanks for your help.

  4. #4
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284

    Post

    I don't knnow that a class module is the answer...and unfortunately neither is this, because you have already created your 43 forms. But for future reference you can create a form template with the specific piece of code required and every time you add a form to your project you can add the form template that you created.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633

    Post

    Thank you Bigley!

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