locked
VBA Code To Check If A Reminder Already Exists RRS feed

  • Question

  • I have some vba code that creates a reminder in my outlook calendar from data in excel. But I don't have a way of knowing if I already have created the reminder previously. I want to know if someone can help me tweak my code to show me if I already have this reminder set in outlook. The reminder will have the same exact text in the subject line.
    So if the reminder is already there a message saying reminder already set
    if not
    then set the reminder like normal.

    Here is my code:

    Sub D_Reminders()
        Dim appOl As Object
        Dim objReminder As Object
        Set appOl = GetObject(, "Outlook.application")
        Set objReminder = appOl.CreateItem(1)
        objReminder.Start = ActiveSheet.Range("AC" & ActiveCell.Row).Value
        objReminder.Duration = 1
        objReminder.Subject = "Rate Expires for " & ActiveSheet.Range("A" & ActiveCell.Row).Value
        objReminder.ReminderSet = True
        objReminder.Location = "N/A"
        objReminder.busystatus = olfree
        objReminder.body = "Loan Expires " & ActiveSheet.Range("I" & ActiveCell.Row).Value
        objReminder.display
    End Sub


    MEC


    • Edited by mecerrato Tuesday, April 2, 2019 10:36 PM
    Tuesday, April 2, 2019 10:36 PM