Need reminder for previous day

marc5354

New member
Joined
Nov 23, 2011
Messages
1
Reaction score
0
Points
0
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.

Code:
Option Explicit 
Dim cl As Range 
 
Private Sub ListBox1_Click() 
    Set cl = Sheet1.UsedRange.Find(Me.ListBox1.Value, LookIn:=xlValues) 
    cl.Select 
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
 
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?
 
Back
Top