I have scheduled my program using the windows scheduler and I want to know how I can get the command button to automatically click when the program starts. Any help is greatly appreciated.
Thanks
JK
Printable View
I have scheduled my program using the windows scheduler and I want to know how I can get the command button to automatically click when the program starts. Any help is greatly appreciated.
Thanks
JK
Just by launch this code
in your load or activate event (if your command button's name MyCommandButton)Code:MyCommandButton_Click
change
Private Sub Command1_Click()
to
Public Sub Command1_Click()
and call Command1_Click() when you load the program
*this isn't the right way to go about this, but it will do the job.
You would be better off putting the code into class modules, and calling the methods from switches from the command line, using the Command() object.
Thanks a lot
JK
You may also use the Value property of the CommandButton.
The above code will raise the Click event of the button.Code:Command1.Value = True
Best regards