locked
Application_Reminder event firing twice RRS feed

  • Question

  • Hello,

    The Application_Reminder event seems to be firing twice.  Does anyone know if there is some sort of setting that triggers the event to run again?  Anything I write in that sub ends up running twice, this includes a simple test code.   Here is a simple code I wrote:

    Private Sub Application_Reminder(ByVal Item As Object)

    If Item.Subject = "TEST" Then
    MsgBox "test"
    End If

    End Sub

    I create an appointment with the subject line "TEST" and the message box will appear.  Once I click okay, the message box appears the second time before allowing me to dismiss the appointment.  It works fine when I try this code on someone else's outlook.  It'll run just once for them, but on my outlook it just reruns the code again.  Any ideas??

    Wednesday, April 19, 2017 3:17 PM

Answers

  • Hi beginnervba,

    let us know about installing the latest updates solves your issue or not.

    also try to check the with events code if you had implemented.

    as suggested by Eugene  Astafiev.

    it may also helps you to solve your issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by beginnervba Monday, April 24, 2017 10:19 PM
    • Unmarked as answer by beginnervba Monday, April 24, 2017 10:19 PM
    • Marked as answer by beginnervba Monday, April 24, 2017 10:20 PM
    Friday, April 21, 2017 7:27 AM
  • Hi beginnervba,

    on my side I am not able to reproduce the issue.

    try to put break point on that event and also on other code that you run at that time.

    it is possible that you run some code that cause this issue.

    other thing I suggest you to install the latest updates for outlook and try to reproduce the issue again.

    sometimes it is happens that something get corrupted and it leads to some unexpected behavior by the office application.

    updating the application can solve the issue related with corruption and it can start working normally.

    so you can try to test it on your side and let us know if issue is still exist so we can try to provide further suggestions to solve the issue.

    for more information you can refer link below.

    Application.Reminder Event (Outlook)

    Regards

    Deepak  


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by beginnervba Monday, April 24, 2017 10:19 PM
    Thursday, April 20, 2017 8:07 AM

All replies

  • I don't see anything strange in the code listed above. It looks like something is wrong with your machine or Outlook. Try to repair Outlook. How do you subscribe to the Reminder event in VBA?


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers


    Wednesday, April 19, 2017 7:03 PM
  • Do you get just one reminder? Is the same item passed as the argument?

    How do you set up the event handler? Are you sure you are not doing that twice?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, April 19, 2017 7:31 PM
  • Hi beginnervba,

    on my side I am not able to reproduce the issue.

    try to put break point on that event and also on other code that you run at that time.

    it is possible that you run some code that cause this issue.

    other thing I suggest you to install the latest updates for outlook and try to reproduce the issue again.

    sometimes it is happens that something get corrupted and it leads to some unexpected behavior by the office application.

    updating the application can solve the issue related with corruption and it can start working normally.

    so you can try to test it on your side and let us know if issue is still exist so we can try to provide further suggestions to solve the issue.

    for more information you can refer link below.

    Application.Reminder Event (Outlook)

    Regards

    Deepak  


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by beginnervba Monday, April 24, 2017 10:19 PM
    Thursday, April 20, 2017 8:07 AM
  • Subscribe?  Do you mean like how is it triggered?  I setup a reminder on the calendar with the subject "TEST" and set it with an alert.  Once the alert runs it would run the rest of the code.  My problem is that the code ends up running twice.  So in this case 2 message boxes that say "test" appears, once after I close both of them, the menu selection to dismiss my appointment pops-up.  It runs fine on my coworker's outlook but I don't know why it doesn't with mine.  Maybe a setting somewhere?

    Thursday, April 20, 2017 6:38 PM
  • I've cleared all reminders for the day and created only the "TEST" reminder.  It still runs my code twice.  I only set up the Application_Reminder(ByVal Item As Object) event once on my outlook so it shouldn't be reading anything else.  I've also cleared all codes from outlook and started over again.  Same problem... I'm thinking it might be a setting somewhere...
    Thursday, April 20, 2017 6:43 PM
  • I'm thinking you might be right.  Maybe I'll check to see if there are updates available or maybe I can try and see if I can get it reinstalled.  I tried putting a break line on my code like "exit sub" but that didn't work.  What happens is that it runs through the entire subroutine and then reruns again so even with the break the message box appears again.  Before this issue it was firing on all appointments regardless of the subject line so you might be right.  Something might have corrupted.

    Thursday, April 20, 2017 6:50 PM
  • Looks like you added an event handler twice, i.e. declared a variable using the WithEvents keyword to identify the object whose event you want to handle and in the VBA editor. Is that the case?

    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Thursday, April 20, 2017 6:58 PM
  • Hi beginnervba,

    let us know about installing the latest updates solves your issue or not.

    also try to check the with events code if you had implemented.

    as suggested by Eugene  Astafiev.

    it may also helps you to solve your issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by beginnervba Monday, April 24, 2017 10:19 PM
    • Unmarked as answer by beginnervba Monday, April 24, 2017 10:19 PM
    • Marked as answer by beginnervba Monday, April 24, 2017 10:20 PM
    Friday, April 21, 2017 7:27 AM
  • So I removed and reinstalled Outlook which ended up clearing the problem.  I think it might have been some prior code I wrote which corrupted outlook.  Thanks guys for the help.
    Monday, April 24, 2017 10:18 PM