建议金字塔增加Application.OnTime功能,方便VBA程序降低系统消耗,每隔一定时间运行一次软件。目前金字塔只有Application.setTimer
下面为Application.OnTime可以实现每间隔一定时间执行程序:
Sub macro_timer()
'Tells Excel when to next run the macro.
Application.OnTime Now + TimeValue("00:00:1"), "my_macro"
End Sub
Sub my_macro()
'Macro code that you want to run.
MsgBox "This is my sample macro output."
'Calls the timer macro so it can be run again at the next interval.
Call macro_timer
End Sub
我没有理解这个和计时器差别在哪
不都是每隔一定时间去执行吗,难道差别就在于这个每隔一定时间的判断是程序去判断,还是软件去判断吗
如果是这样,这又有啥区别呢,难道软件去判断就不是按时间判断
金字塔不是有提供 Application.Timer 事件吗?