hi,
I have this table and the code below but when run it get run-time error 13 mismatch, please help.
[TABLE="width: 1327"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Contact[/TD]
[TD]A/C[/TD]
[TD]Date[/TD]
[TD]Due Date[/TD]
[TD]Days[/TD]
[TD]Inv#[/TD]
[TD]$[/TD]
[TD]Due in days[/TD]
[TD]Email[/TD]
[/TR]
</tbody>[/TABLE]
***Note: due date is column "F"
thank you
I have this table and the code below but when run it get run-time error 13 mismatch, please help.
[TABLE="width: 1327"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Contact[/TD]
[TD]A/C[/TD]
[TD]Date[/TD]
[TD]Due Date[/TD]
[TD]Days[/TD]
[TD]Inv#[/TD]
[TD]$[/TD]
[TD]Due in days[/TD]
[TD]Email[/TD]
[/TR]
</tbody>[/TABLE]
***Note: due date is column "F"
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("F" & Rows.Count).End(xlUp).Row
For i = 3 To lstRow
If Range("F" & i) - Date <= 6 Or Range("F" & i) - Date < 0 Then
msg = msg & Range("A" & i).Value & " due in " & Range("F" & i) - Date & " Days" & vbCrLf
End If
Next i
MsgBox msg
Call settimer
End Sub
Sub settimer()
Application.OnTime Now + TimeValue("02:00:00"), "popup"
End Sub
thank you