Programmatically trigger an event

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
 
R

Rick Brandt

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top