第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Outlook VBA-每半小時(shí)運(yùn)行一次代碼

Outlook VBA-每半小時(shí)運(yùn)行一次代碼

倚天杖 2019-12-17 09:15:02
我想每半小時(shí)在Outlook(VBA)中運(yùn)行一個(gè)特定的代碼。而且,在代碼運(yùn)行時(shí),Outlook用戶也不應(yīng)受到打擾。它應(yīng)僅在后端運(yùn)行。有一個(gè)名為的事件Application_Reminder。它在Outlook中每次出現(xiàn)提醒時(shí)運(yùn)行。但這仍然涉及用戶交互。我想要一個(gè)完整的后端程序。
查看完整描述

3 回答

?
紫衣仙女

TA貢獻(xiàn)1839條經(jīng)驗(yàn) 獲得超15個(gè)贊

對于Win64,我需要將其更改為:


Declare PtrSafe Function SetTimer Lib "user32" (ByVal hwnd As LongLong, ByVal nIDEvent As LongLong, ByVal uElapse As LongLong, ByVal lpTimerfunc As LongLong) As LongLong

Declare PtrSafe Function KillTimer Lib "user32" (ByVal hwnd As LongLong, ByVal nIDEvent As LongLong) As LongLong


Public TimerID As LongLong 'Need a timer ID to eventually turn off the timer. If the timer ID <> 0 then the timer is running


Public Sub TriggerTimer(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idevent As Long, ByVal Systime As Long)

  MsgBox "The TriggerTimer function has been automatically called!"

End Sub



Public Sub DeactivateTimer()

Dim lSuccess As LongLong

  lSuccess = KillTimer(0, TimerID)

  If lSuccess = 0 Then

    MsgBox "The timer failed to deactivate."

  Else

    TimerID = 0

  End If

End Sub


Public Sub ActivateTimer(ByVal nMinutes As Long)

  nMinutes = nMinutes * 1000 * 60 'The SetTimer call accepts milliseconds, so convert to minutes

  If TimerID <> 0 Then Call DeactivateTimer 'Check to see if timer is running before call to SetTimer

  TimerID = SetTimer(0, 0, nMinutes, AddressOf TriggerTimer)

  If TimerID = 0 Then

    MsgBox "The timer failed to activate."

  End If

End Sub



查看完整回答
反對 回復(fù) 2019-12-17
?
阿波羅的戰(zhàn)車

TA貢獻(xiàn)1862條經(jīng)驗(yàn) 獲得超6個(gè)贊

更正64位的上限答案:


Declare PtrSafe Function SetTimer Lib "user32" (ByVal hwnd As LongLong, ByVal nIDEvent As LongLong, ByVal uElapse As LongLong, ByVal lpTimerfunc As LongLong) As LongLong

Declare PtrSafe Function KillTimer Lib "user32" (ByVal hwnd As LongLong, ByVal nIDEvent As LongLong) As LongLong


Public TimerID As LongLong 'Need a timer ID to eventually turn off the timer. If the timer ID <> 0 then the timer is running


Public Sub TriggerTimer(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idevent As Long, ByVal Systime As Long)

  MsgBox "The TriggerTimer function has been automatically called!"

End Sub



Public Sub DeactivateTimer()

Dim lSuccess As LongLong              '<~ Corrected here

  lSuccess = KillTimer(0, TimerID)

  If lSuccess = 0 Then

    MsgBox "The timer failed to deactivate."

  Else

    TimerID = 0

  End If

End Sub


Public Sub ActivateTimer(ByVal nMinutes As Long)

  nMinutes = nMinutes * 1000 * 60 'The SetTimer call accepts milliseconds, so convert to minutes

  If TimerID <> 0 Then Call DeactivateTimer 'Check to see if timer is running before call to SetTimer

  TimerID = SetTimer(0, 0, nMinutes, AddressOf TriggerTimer)

  If TimerID = 0 Then

    MsgBox "The timer failed to activate."

  End If

End Sub



查看完整回答
反對 回復(fù) 2019-12-17
  • 3 回答
  • 0 關(guān)注
  • 522 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)