Results 1 to 3 of 3

Thread: [RESOLVED] understanding control events

  1. #1

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    217

    Resolved [RESOLVED] understanding control events

    Hello to all

    I need some guidance on how to activate\start an event (control) once the program is started - click this or that control or automate an action.

    I know I can put whatever in the form_load event and start the prg - but how to for example ; simulate a click event in code?

    Thanks in advance to all

    Jeff

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,707

    Re: understanding control events

    Put the code which is in a Click event in a new subroutine.
    When you have a command button cmdStart then you can use the following idea
    Code:
    Private Sub cmdStart_Click()
      StartProcess
    End Sub
    
    Private Sub StartProcess()
     your code
    End Sub
    Now you can also call StartProcess from other places in the code

  3. #3

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    217

    Re: understanding control events

    Solved plain and simple - thanks to you and Happy New year!

    Jeff

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