Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当前时间 目标时间 上午 9:32:28 下午 5:32:00
如上所述,我有两次。当前时间是系统当前时间,目标时间是用户输入时间。当两个时间都匹配时,我希望宏自动运行。
第一个块启动宏。
Sub Alarm() Application.OnTime "17:32:00", "MacroName" End Sub Sub MacroName() MsgBox "Macro is Running" End Sub