VBA: Event for triggered Events

风格不统一 提交于 2020-02-16 09:58:04

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!