+ Reply to Thread
Results 1 to 3 of 3

Need a MsgBox if a Date in a Range is 30 Days Old

  1. #1
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Need a MsgBox if a Date in a Range is 30 Days Old

    I attached the sheet in which I would like this to apply, particularly because it already contains some code under the Sub Worksheet_Calculate() and I wanted to make sure it got merged with this new code ok.

    Basically I just want a macro to Check M2:M2000 and see if any of the dates that appear there are older than 30 days. If they are then I would like it to put up a MsgBox displaying any overdue CARs and would like the msgbox to display the CAR # in column A associated with the overdue date in Column M.

    For example, looking at the attached sheet- the msgbox would pop up when the user selects the log sheet and it would say:

    "Todays Date is 8/28/2009
    CAR # 236 was due on 7/26/2009 and is now overdue!
    CAR # 239 was due on 7/24/2009 and is now overdue!"

    and then the user would click "ok" to get out of the msgbox

    I appreciate the help!









    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Need a MsgBox if a Date in a Range is 30 Days Old

    Here is the attachment.. sorry forgot it
    Attached Files Attached Files

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Need a MsgBox if a Date in a Range is 30 Days Old

    Hello mrgillus,

    The following macro has been added to "Sheet1" to run the macro. Each over due date found is first displayed in a message box and copied to the sheet with the CAR number and the due date.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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