+ Reply to Thread
Results 1 to 5 of 5

Date Reminder

Hybrid View

  1. #1
    Registered User
    Join Date
    01-08-2012
    Location
    Brisbane
    MS-Off Ver
    Excel 2007
    Posts
    19

    Date Reminder

    Hi everyone

    Im trying to get Excel to remind me on workbook open if a date is a 2 days past the recorded date.

    for example in cell A12 i will have a datestamp of the 16 September 2012

    and i want it to remind me if im 2 days overdue

    Private Sub Workbook_Open()
        Dim Msg As String
        Dim Msg1 As String
        If Range("A12") = TODAY + 2 Then
            Msg = " Overdue"
            MsgBox Msg
        Else
            Msg1 = "not overdue"
            MsgBox Msg1
          End If
    End Sub
    This code always returns "not overdue" and i cannot get it to display the "overdue" message.

    can anyone help to correct it please?

    much appreciated

  2. #2
    Forum Contributor
    Join Date
    08-23-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Date Reminder

    Try this...

    If Range("A12").Value + 2 <= Date Then

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Date Reminder

    change this line:

    If Range("A12") = TODAY + 2 Then
    as

    If Range("A12") = Date + 2 Then

  4. #4
    Registered User
    Join Date
    01-08-2012
    Location
    Brisbane
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Date Reminder

    Thanks for the quick replies

    first response worked like a charm thanks

  5. #5
    Registered User
    Join Date
    01-08-2012
    Location
    Brisbane
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Date Reminder

    Hi guys,

    firstly thanks for the help but yesterday i was to quick to close the topic before actuall testing this code extensively.

    I have been playing around with the characters plus and minues and "<" , ">" before the number and with the first reply and code supplied there will always have a Msg Pop up with reminder if its anywhere before the date or after it. the second reply and code unfortunately still gives me the "nothing response regardless of the date.

    I need some help getting the exact dates i.e 7 days after the date.

    Any suggestions?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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