Results 1 to 4 of 4

If 5 days left then MsgBox "5 Days Left"

Threaded View

  1. #1
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    If 5 days left then MsgBox "5 Days Left"

    Greetings,
    Following macro is almost okey.
    Sub Macro1()
    Dim c As Range
    For Each c In Sheets("Sheet1").UsedRange
        If Date < c.Value Then
        c.Interior.Color = 65535
        MsgBox Prompt:="5 days left.", Buttons:=vbInformation, Title:="Hello"
        End If
    Next c
    End Sub
    I need something like this;
    Sub Macro1()
    Dim c As Range
    For Each c In Sheets("Sheet1").UsedRange
        If Date < c.Value - 5 Then
        c.Interior.Color = 65535
        MsgBox Prompt:="5 days left.", Buttons:=vbInformation, Title:="Hello"
        End If
    Next c
    End Sub
    Check enclosed file.
    Attached Files Attached Files
    Last edited by HerryMarkowitz; 01-12-2014 at 06:43 AM.
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Averaging days ("d:h:mm") / or just converting the days to hours ("h:mm")
    By dutchstocks in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2013, 11:18 AM
  2. [SOLVED] Expanded and collapsed the rows by toggle "+" or "-" sign on left of the text
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-24-2013, 02:49 PM
  3. Applying a "Left" formula to an entire column with heading "ValueCol"
    By aad401 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2012, 04:14 PM
  4. Converting number of days to "months/days"
    By livemusic in forum Excel General
    Replies: 2
    Last Post: 04-11-2012, 06:36 PM
  5. Replies: 5
    Last Post: 06-26-2006, 09:23 PM

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