问题
I am looking to see if there is an Events trigger for well... Events. I'm making an idle timeout function and the thought of having to call my function for every procedure seems a bit unnecessary. More specifically OnClick events. I do have an DoEvents loop that is constantly going. I there a way to find what is being triggered via DoEvents? Or DoEvents Returns what Event is running.
回答1:
That would be WithEvents - poorly documented but quite handy. Recently, I wrote an article on a different subject where WithEvents proved extremely useful:
Create Windows Phone Colour Palette and Selector using WithEvents
It also contains a link to a tutorial by John Colby.
来源:https://stackoverflow.com/questions/44622205/vba-event-for-triggered-events