我想在三个不同的时间段要程序执行一定的操作,应该如何?

zclzy520 2005-06-13 11:51:58
我是用了一个timer控件,可是不行

sub Timer1_Timer()
dim starttime1 as string
dim starttime2 as string
dim starttime3 as string
starttime1=date & " 09:00:00"
starttime2=date & " 12:50:00"
starttime3=date & " 00:00:00"
if now()=startime1 or now()=startime2 or now()=startime3 then
msgbox "你好"
end if
end sub
应该怎么办?
...全文
54 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zclzy520 2005-06-13
  • 打赏
  • 举报
回复
已经解决拉,忘记加上cdate拉
留下些什么 2005-06-13
  • 打赏
  • 举报
回复
一定可以的
DawnPine 2005-06-13
  • 打赏
  • 举报
回复
你Timer的时间间隔是多少?有没有Enable?
另: 最好不好用 = 来判断

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧