1. 想让vb在多个时间点执行我的程序要怎么写?
比如想它分别在9:00 , 11:20 , 15:16执行我的程序
比如我试了一下:
------------
sub timer() ’timer的周期我设为100
if time=“9:00”or“ 11:20”or“15:16” then
msgbox“执行吧”
end if
end sub
--------------
不行。
是不能用“or”吗?
我单个的用 if time=“9:00” 是可以的,就是用了or以后多个就不行2.另外同样也是“多项”问题:在发送邮件时如果想发送到多个地址,要怎么写呢?
我试了下直接用逗号或者“&”,好像不行,比如:
Set Email = CreateObject("CDO.Message")
Email.From = "[email protected]" '发信人地址
Email.To = "[email protected]" &“[email protected]" & "[email protected]" '收信人地址
Email.Subject = "11111111a1"
要怎么写呢?谢谢!!!
比如想它分别在9:00 , 11:20 , 15:16执行我的程序
比如我试了一下:
------------
sub timer() ’timer的周期我设为100
if time=“9:00”or“ 11:20”or“15:16” then
msgbox“执行吧”
end if
end sub
--------------
不行。
是不能用“or”吗?
我单个的用 if time=“9:00” 是可以的,就是用了or以后多个就不行2.另外同样也是“多项”问题:在发送邮件时如果想发送到多个地址,要怎么写呢?
我试了下直接用逗号或者“&”,好像不行,比如:
Set Email = CreateObject("CDO.Message")
Email.From = "[email protected]" '发信人地址
Email.To = "[email protected]" &“[email protected]" & "[email protected]" '收信人地址
Email.Subject = "11111111a1"
要怎么写呢?谢谢!!!
dim s as strings=format(now(),"hh:nn")
if s=“9:00” or s=“ 11:20” or s=“15:16” then
msgbox“执行吧”
end if
end sub