在VBA中没有内置的Timer控件,若需实现定时功能,必须借助Windows系统的API函数SetTimer和KillTimer。以Excel2013 64位版本为例,通过调用这两个API函数,可在VBA中完成定时操作的简单应用,实现周期性任务执行或延时处理等功能,扩展了VBA在自动化处理中的能力。
'For example: Start / Stop the timer every time the cell. 'but may also be placed on a button or another ...