Hi,
I have a class module that basically controls a motor to open/close a trap. I defined the open and close methods. The methods simply turn on (of off) the motor and monitor the closure of a limit switch to stop motion. As with any mechanical system, things can and will go wrong and I have a panic stop button on the main user form to freeze the motor in order to prevent an accident or simply get out of the method if the switch is defective.
I do not know how to make the method recognize the fact that the form button has been pressed. I suspect it has to do with a "with event" declaration but am not sure how to incorporate this.
Any help would be welcome.
Thanks
Olivier