You can schedule reminders in Excel with VBA by using the Application.OnTime method to run a macro at a set time or after a delay. This lets you pop up a message box, play a sound, or highlight a cell when a deadline approaches. The technique works in any desktop version of Excel; it does not run when Excel is closed, and it is not supported in Excel for the web. You will need the Developer tab enabled and macros allowed in your workbook.

What You'll Need

  • Excel for Windows or Mac (desktop version). The steps below refer to the Windows ribbon; Mac labels are similar but may differ slightly.
  • The Developer tab enabled: File > Options > Customize Ribbon, then tick Developer in the right-hand list. On Mac: Excel > Preferences > Ribbon & Toolbar.
  • Macro security set to allow macros in your file. If macros are disabled, the reminder will never fire.
  • A workbook saved as .xlsm (macro-enabled). A normal .xlsx file will lose the code when closed.
  • Basic familiarity with the VBA editor (Alt+F11 on Windows, Option+F11 on Mac).

Step-by-Step

  1. Open the VBA editor. Press Alt+F11 (Windows) or Option+F11 (Mac). In the Project pane, find your workbook and right-click it, then choose Insert > Module. A blank code window appears.
  2. Write a reminder macro. This is the code that will run when the time arrives. For example:
    Sub ShowReminder()
        MsgBox "Time to check the project status!", vbInformation, "Reminder"
    End Sub
    Keep the name simple and unique. You can replace the message with anything you like, or add code to colour a cell: Range("A1").Interior.Color = vbYellow.
  3. Write a scheduler macro. This one tells Excel when to run the reminder. For a one-off reminder at a specific time today:
    Sub ScheduleReminder()
        Application.OnTime EarliestTime:=TimeValue("14:30:00"), _
            Procedure:="ShowReminder"
    End Sub
    Replace "14:30:00" with your target time in 24-hour format. If that time has already passed today, Excel will not run it; schedule for tomorrow instead using Date + 1 plus the time.
  4. Run the scheduler once. Place your cursor inside ScheduleReminder and press F5. Excel now holds the reminder in memory. You can close the VBA editor; the reminder stays queued as long as Excel remains open.
  5. Test it. Schedule a reminder two minutes ahead, then wait. A message box should appear at the set time. If nothing happens, check that macros are enabled and that the procedure name in OnTime matches the macro name exactly (no quotes around the name in the Sub line, quotes in OnTime).
  6. Cancel a pending reminder if needed. Application.OnTime can be cancelled only if you stored the scheduled time in a variable. A common pattern is to keep the time in a module-level variable and call Application.OnTime EarliestTime:=scheduledTime, Procedure:="ShowReminder", Schedule:=False. Without that stored time, you cannot cancel it and must close Excel.
  7. Make it repeat. For a recurring reminder, have the reminder macro reschedule itself at the end:
    Sub ShowReminder()
        MsgBox "Hourly check", vbInformation
        Application.OnTime Now + TimeValue("01:00:00"), "ShowReminder"
    End Sub
    This chains the reminder every hour until Excel closes. Be careful not to create two chains by running the scheduler twice.
  8. Save and reopen. Save as .xlsm. When you reopen the file, the schedule is gone because OnTime lives only in the current Excel session. Run the scheduler macro again (or call it from a Workbook_Open event in the ThisWorkbook module) to re-arm it.

Common Mistakes

  • Using a normal .xlsx file, so the code is stripped on save. Always use .xlsm.
  • Mismatching the macro name: Procedure:="ShowReminder" must match Sub ShowReminder() exactly, including capitalisation is not required but spelling is.
  • Scheduling a time that has already passed today. Excel silently does nothing.
  • Running the scheduler macro more than once, which queues duplicate reminders and shows multiple message boxes.
  • Expecting the reminder to fire while Excel is closed. It will not; OnTime only works while the application is running.
  • Forgetting that a modal message box pauses other macros until someone clicks OK.

Tips

  • Use Now + TimeValue("00:10:00") for a simple "in 10 minutes" reminder instead of a clock time.
  • Store the scheduled time in a public variable so you can cancel or reschedule later.
  • Put the scheduler call in the ThisWorkbook module under Private Sub Workbook_Open() so reminders re-arm each time the file opens.
  • Use MsgBox with vbInformation or vbExclamation for clearer visual cues.
  • Keep reminder macros short; long-running code in a reminder can block Excel.
  • If you need reminders when Excel is closed, use Outlook tasks or your phone's reminder app instead; VBA cannot wake a closed Excel.

Troubleshooting

If the reminder does not appear, work through these checks in order. First, confirm macros are enabled: the yellow security bar should not be showing, and File > Options > Trust Center > Macro Settings should allow macros. Second, open the VBA editor and press Ctrl+G to open the Immediate window, type ?Application.OnTime is not valid; instead re-run the scheduler and watch for errors. Third, verify the time format: TimeValue("2:30 PM") and TimeValue("14:30:00") both work, but TimeValue("2:30") may be interpreted differently by region. Fourth, check that the procedure name is spelled identically in both places. Fifth, if you see a "Cannot run the macro" error, the macro may be in a different module or the workbook may not be the active one. Close and reopen Excel to clear any stuck OnTime queue, then re-run the scheduler once. If the reminder fires but the message is wrong, edit the ShowReminder macro and save. On Mac, confirm that Excel has permission to display notifications if you use system alerts.

Frequently Asked Questions

Can Excel VBA reminders run when Excel is closed?

No. Application.OnTime works only while Excel is open. For reminders outside Excel, use Outlook tasks, your phone's alarm, or Windows Task Scheduler to open the file.

How do I cancel a scheduled reminder?

You must have saved the scheduled time in a variable. Then call Application.OnTime EarliestTime:=savedTime, Procedure:="ShowReminder", Schedule:=False. Without the stored time, close and reopen Excel to clear the queue.

Why does my reminder fire multiple times?

You probably ran the scheduler macro more than once, or your reminder macro reschedules itself and you also ran the scheduler. Close Excel to reset, then run the scheduler only once.

Does this work in Excel for the web or on mobile?

No. VBA and Application.OnTime are not supported in Excel for the web or the mobile apps. Use the desktop version.

Can I schedule a reminder for a specific date, not just a time?

Yes. Use DateSerial(2025, 6, 15) + TimeValue("09:00:00") as the EarliestTime. Excel will fire it on that date if the workbook stays open.

Will the reminder survive if I close and reopen the workbook?

No. The schedule is lost when Excel closes. Re-arm it by calling your scheduler from the Workbook_Open event or by running the macro manually after opening.