Hi All,
I am trying to create a some sort of reminder inside the excel file. Basically it works with on time event then trigers the code called "CheckReminder". I can call the code no problem. There is a option for users to dismiss or snooze, that part is a bit of mess. When the user choses to dismiss it works properly and goes the next item, but if the user choses "no"(that means to snooze" because of "exit sub" the code dies right there. I could not thing of the logic, anyone to give a hand? FYI, excel is my only option for this cannot use outlook. Thanks in advance.
Baha
Here is my code:
I am trying to create a some sort of reminder inside the excel file. Basically it works with on time event then trigers the code called "CheckReminder". I can call the code no problem. There is a option for users to dismiss or snooze, that part is a bit of mess. When the user choses to dismiss it works properly and goes the next item, but if the user choses "no"(that means to snooze" because of "exit sub" the code dies right there. I could not thing of the logic, anyone to give a hand? FYI, excel is my only option for this cannot use outlook. Thanks in advance.
Baha
Here is my code:
Code:
Sub CheckReminder()
Dim cel As Range
Dim Prompt, Buttons, Title, Help, Ctxt, Response, MyString
Buttons = vbYesNo + vbCritical + vbDefaultButton1
Title = "CALLING FOR REMINDER"
For Each cel In Sheets("Reminder").Range("G:G")
Prompt = "There is a reminder about: " & Chr(13) _
& " { " & cel.Text & " }" & " on " & cel.Offset(0, 1) & " at " & Format(cel.Offset(0, 2), "HH:MM") _
& Chr(13) _
& "Please Click YES to Dismiss , Click NO to Snooze"
If cel <> "" And cel.Offset(0, 3) = "" Then
Response = MsgBox(Prompt, Buttons, Title, Help, Ctxt)
If Response = vbYes Then
GoTo 20
Else
Exit Sub
End If
20 cel.Offset(0, 3) = "dismissed"
End If
Next cel
End Sub