call an event button click from another form

J

JCP

I have a form (FormA) always open, visible or hide.
How can I call an event existing in the button of the FormA from another form?
Thanks for suggestions
jcp
 
K

Klatuu

First, the event procedure in the FormA form has to be declared public
Then, if it is a Sub

Forms!FormA.Button_Click

However; to avoid any confusion, I would suggest you put the code the button
executes in a standard module then just call it form both FormA and your
other form.
 
Top