+ Reply to Thread
Results 1 to 3 of 3

How to set pop up reminders

Hybrid View

  1. #1
    Registered User
    Join Date
    04-09-2015
    Location
    london
    MS-Off Ver
    2013
    Posts
    3

    How to set pop up reminders

    So I need a way for excel to pop up reminders for things that are due.

    For example. 3 collums name, date one, date 2.

    If date 2 is not filled in 21 days after date one. It should pop up with please fill in date 2.

    This is for use to remind about vaccinations
    theres about 20 pages so cant all be checked every day manually

  2. #2
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: How to set pop up reminders

    Something like:

    Sub Happy
    If Range("C1").Value <> Range("B1").Value + 21 Then
    MsgBox "Please fill in date 2"
    End If
    End Sub
    This will obviously only check 1 row, I'm unsure about the structure of your worksheets without a template so I cannot help any more than that until you upload an anonymous template.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: How to set pop up reminders

    I think BeforeClose event will best suit this scenario.
    Assuming Col. A is Name, B is Date1 and C is Date2, then

    Place the following code on ThisWorkbook Module.....
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Dim ws As Worksheet
    Dim lr As Long, cnt As Long
    Dim rng As Range, cell As Range
    
    Set ws = Sheets("Sheet1")
    lr = ws.Cells(Rows.Count, "B").End(xlUp).Row
    
    Set rng = ws.Range("B2:B" & lr)
    
    For Each cell In rng
            If cell.Offset(0, 1) = "" And cell + 21 < Date Then
                    cell.Offset(0, 1).Interior.ColorIndex = 3
                    cnt = cnt + 1
            Else
                    cell.Offset(0, 1).Interior.ColorIndex = xlNone
            End If
    Next cell
    
    If cnt > 0 Then
            MsgBox "Please fill the cells highlighted with Red color.", vbCritical
            Cancel = True
    End If
    
    End Sub
    So once user tries to close the workbook, the code will highlight the col. C if it is not filled as per the criteria and workbook won't be closed unless user fill all the dates in col. 2 in the highlighted cells.

    You may use the following code for Worksheet_Change even to make sure that user only inputs the valid dates in col. C.
    Right click on the Sheet Tab --> View Code --> and place the below code on the opened code window.
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    If Target.Column = 3 And Target.Row > 1 Then
            If Target <> "" And Not IsDate(Target) Then
                    MsgBox "Please input a date only.", vbCritical, "Invalid Date!"
                    Target = ""
                    Target.Select
            End If
    End If
    End Sub
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Birthday Reminders
    By Kamote.Que in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-02-2015, 04:01 AM
  2. about the reminders in excel
    By nikhillouis in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-07-2014, 03:03 AM
  3. Reminders
    By andrewsparrow in forum Excel General
    Replies: 1
    Last Post: 10-10-2012, 09:59 AM
  4. Reminders
    By dayhab in forum Excel General
    Replies: 1
    Last Post: 04-05-2012, 06:27 PM
  5. creating reminders
    By newo in forum Excel General
    Replies: 0
    Last Post: 09-28-2006, 05:27 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1