PDA

View Full Version : [SOLVED:] automatically start command button



TonC
01-20-2016, 10:22 AM
Hello,
When I Load a form, I would like to start automatically a commandbutton on that form, without clicking on this commandbutton.

I Know, perhaps there must be some code in a on-load event. Could you help me on my way?

thx in advance.

SamT
01-20-2016, 12:36 PM
Sub Commandbutton_Click
StartupCodeSub
End Sub

Sub OnLoad
StartupCodeSub
End Sub

Sub StartupCodeSub ()
'all code from CommandButton goes here
End Sub

TonC
01-20-2016, 10:35 PM
Hello SamT,
A short answer, I used Sub Onload and called a function. Works fine !!
Thanks.