Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook 2000 VBA Timer

Status
Not open for further replies.

wellas666

Programmer
Feb 10, 2006
23
GB
This is for Outlook 2000 VBA.

Can you check what I am doing wrong with following code. It will not fire the Sub TimerProc:

Public Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Public Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Public lngRet As Long

Public Sub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long)
Debug.Print "Hiiiiiii"
KillTimer 0&, lngRet
End Sub

Public Sub test()
lngRet = SetTimer(0, 0, 100, AddressOf TimerProc)
End Sub
 
Your code works for me without modification (for both Outlook 2000 & Excel 2000).


Regards,
Mike
 
Very strange then. I put all the code in a model...
 
Yes, I put them in VbaProject.OTM - Modelu1 (Code), and I have just repaired Office.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top