為什么KillTimer沒(méi)起作用?
作者:金字塔 來(lái)源:cxh99.com 發(fā)布時(shí)間:2014年11月27日
- 咨詢內(nèi)容:
Sub cs()
Call Application.SetTimer(0,5*1000) if time> "16:30:40" then call Application.KillTimer(0)
'if time> "16:30:40" then' application.msgout "yes"'else' application.msgout "no"'end if
End Sub
Sub Application_Timer(ID)Application.msgout Cdate(time) & ",0號(hào)計(jì)時(shí)器觸發(fā)了"End Sub
16:29:59,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:04,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:09,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:14,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:19,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:24,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:29,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:34,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:39,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:44,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:49,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:54,0號(hào)計(jì)時(shí)器觸發(fā)了16:30:59,0號(hào)計(jì)時(shí)器觸發(fā)了16:31:04,0號(hào)計(jì)時(shí)器觸發(fā)了
[此貼子已經(jīng)被作者于2014/7/29 16:39:21編輯過(guò)]
- 金字塔客服:
時(shí)間格式不對(duì),改成 time > TimeSerial(
16,30,40 ) 再試試
- 用戶回復(fù):
沒(méi)用!還是照樣.其實(shí),time> "16:30:40"這個(gè)寫(xiě)法我是調(diào)試通過(guò)了的
[此貼子已經(jīng)被作者于2014/7/29 21:19:28編輯過(guò)]
- 網(wǎng)友回復(fù):
[此貼子已經(jīng)被作者于2014/7/29 21:23:06編輯過(guò)]
- 網(wǎng)友回復(fù):
Call Application.SetTimer(0,5*1000)
if time> "16:30:40" then
application.msgout "yes"
call Application.KillTimer(0)
end if
加上調(diào)試語(yǔ)句看看killtimer代碼行到底執(zhí)行過(guò)沒(méi)有