以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  要在周一到周五12:00 ----14:30 分之前做某个事,怎么写代码?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=122433)

--  作者:ycwk
--  发布时间:2018/7/25 15:02:00
--  要在周一到周五12:00 ----14:30 分之前做某个事,怎么写代码?
不要在周一到周五12:00  ----14:30 分之前做某个事(msgbox(1)),怎么写代码?
[此贴子已经被作者于2018/7/25 15:03:42编辑过]

--  作者:有点甜
--  发布时间:2018/7/25 15:22:00
--  

做个计划(定时器),写代码

 

static d1 As Date = Date.today.AddDays(-1)

If d1 <> Date.today AndAlso Date.today.DayOfWeek >= 1 AndAlso Date.today.DayOfWeek <= 5 AndAlso format(Date.Now, "HHmm") >= "1200" AndAlso format(Date.Now, "HHmm") <= "1430" Then
    d1 = Date.today
    msgbox(123)
End If