call an event in code

  • Thread starter Thread starter Guest
  • Start date Start date
clara said:
Hi all,

How can an event ( such as button.click) be call in code like any
sub?

An event can not be called. What you probably want to do is execute the same
procedure as if a button has been clicked. Move the code from the event
handler into a procedure and that can be called from the event handler and
from anywhere else.


Armin
 
clara said:
How can an event ( such as button.click) be call in code like any sub?

'Me.Button1.PerformClick()'. Note that this will only work if the control
is enabled and visible.
 
Back
Top