Results 1 to 4 of 4

msgbox if todays date is past date in cell

Threaded View

  1. #1
    Forum Contributor timtim89's Avatar
    Join Date
    01-05-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    141

    msgbox if todays date is past date in cell

    Hey,

    When opening a workbook, I want a msgbox to pop up, if todays date is past the date in date in cell c4.
    I tried the formula beneath, but it gives me the msgbox nomatter if the condition is met or not.
    Thanks in advance for your help and effort.

    Private Sub Workbook_Open
    With Sheets("Main")
    If Range("c4") < Date Then
    MsgBox "Workbook has expired", vbOKOnly
    Else
    Exit Sub
    End If
    End With
    
    End Sub
    Last edited by timtim89; 03-21-2012 at 07:09 PM.

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