Results 1 to 2 of 2

Thread: Need reminder for previous day

  1. #1

    Need reminder for previous day

    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi All..

    here i am looking for date reminder for current and previous day.

    here is the code for current day reminder. but don't know what to do reminder for previous day (YESTERDAY).

    any help or suggestion is most appreciated.

    Option Explicit 
    Dim cl As Range 
    Private Sub ListBox1_Click() 
        Set cl = Sheet1.UsedRange.Find(Me.ListBox1.Value, LookIn:=xlValues) 
    End Sub 
    Private Sub UserForm_Initialize() 
        Dim rDates As Range 
        Me.Caption = "appointments due: " & Format(Date, "long date") 
        With Sheet1 
            Set rDates = .Range(.Cells(3, 2), .Cells(.Rows.Count, 2).End(xlUp)) 
        End With 
        For Each cl In rDates 
            If cl.Value = Date Then Me.ListBox1.AddItem cl.Offset(0, -1).Value 
        Next cl 
    End Sub

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Nanaimo, BC, Canada
    Blog Entries
    Excel Version
    Excel Office 365 Insider
    Hi and welcome to the forum.

    I think this might be a case where seeing your data would be quite helpful. Any chance you can upload a copy of the workbook (sanitized) so that we can see what you have and what you're trying to get?
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book Master Your Data for Excel and Power BI, or our new Power Query Recipe cards!

    Main Site: -||- Blog: -||- Forums:
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Posting Permissions

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