Sub time()
Call Application.SetTimer(0,2*1000) '設(shè)置一個(gè)0號(hào)計(jì)時(shí)器,間隔2秒執(zhí)行一次
Call Application.Settimer(9,5*1000) '設(shè)置一個(gè)9號(hào)計(jì)時(shí)器,間隔5秒執(zhí)行一次
End Sub
'下面的過程是計(jì)時(shí)器循環(huán)體,我讓計(jì)時(shí)器顯示每次觸發(fā)的時(shí)間,你看看是不是間隔設(shè)定的秒數(shù)就觸發(fā)。
Sub Application_Timer(ID)
If ID=0 then
Application.msgout ",0號(hào)計(jì)時(shí)器觸發(fā)了"
end if
If ID=9 then
Application.msgout ",9號(hào)計(jì)時(shí)器觸發(fā)了"
end if
End Sub
按說應(yīng)該輸出消息,但實(shí)際消息框無(wú)反應(yīng)。我嘗試著用論壇里所說的刪除注冊(cè)表中的weistock,也沒有效果。