Programmatically trigger an event

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

Hi all -

Is there a way to programmatically trigger a MouseDown (or other) event so
that a control's MouseDown event procedure runs without actually clicking the
control?

I have a MouseDown event for a checkbox that works properly, but I need to
trigger it from code under certain circumstances. If it can be triggered
programmatically, there would be no need to write redundant VBA code.

Thanks in advance,
Jay
 
Jay said:
Hi all -

Is there a way to programmatically trigger a MouseDown (or other)
event so that a control's MouseDown event procedure runs without
actually clicking the control?

I have a MouseDown event for a checkbox that works properly, but I
need to trigger it from code under certain circumstances. If it can
be triggered programmatically, there would be no need to write
redundant VBA code.

Thanks in advance,
Jay

Just call the routine from your other code...


(your other code)
Call ControlName__MouseDown(0, 0, 0, 0)
 
Back
Top