G Guest Nov 14, 2007 #1 Hi all, How can an event ( such as button.click) be call in code like any sub? Clara
A Armin Zingler Nov 14, 2007 #2 clara said: Hi all, How can an event ( such as button.click) be call in code like any sub? Click to expand... 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: Hi all, How can an event ( such as button.click) be call in code like any sub? Click to expand... 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
H Herfried K. Wagner [MVP] Nov 14, 2007 #3 clara said: How can an event ( such as button.click) be call in code like any sub? Click to expand... 'Me.Button1.PerformClick()'. Note that this will only work if the control is enabled and visible.
clara said: How can an event ( such as button.click) be call in code like any sub? Click to expand... 'Me.Button1.PerformClick()'. Note that this will only work if the control is enabled and visible.