求VB如何到指定时间就执行代码

2025-02-28 18:47:17
推荐回答(2个)
回答1:

最简单的做法就是用时间控件:
private sub trimer1_timer()
if time="12:00:00" then '定义自己需要的时间
call mysub '执行自定义过程
timer1.enabled=false
end if
end sub

回答2:

on time