Hi,
how can i make the codes below popup display reminder every 2 hour message.
how can i make the codes below popup display reminder every 2 hour message.
Code:
Sub popup()Dim lstRow As Long
Dim i As Long
Dim msg As String
msg = "The following items are almost due" & vbCrLf & vbCrLf
lstRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To lstRow
If Range("A" & i) - Date <= 3 Or Range("A" & i) - Date < 0 Then
msg = msg & Range("B" & i).Value & " " & "due in " & " " & Range("A" & i) - Date & " Days" & " " & Format(Range("C" & i).Value, "$#,##0.00;($#,##0.00)") & vbCrLf
End If
Next i
MsgBox msg
Call settimer
End Sub
Code:
Sub settimer()Application.OnTime Now + TimeValue("02:00:00"), "popup"
End Sub