Sub 當日到期提醒()
For i = 4 To Cells(3, 2).End(xlDown).Row 'Sheets("客戶明細").UsedRange.Rows.Count
If (Sheets("客戶明細").Cells(i, 38).Value = Date) Then
MsgBox (Sheets("客戶明細").Cells(i, 4).Value & "該餐單已到期,請抽單")
Sheets("客戶明細").Cells(i, 45).Value = "已止餐"
If (Day(Data) = Day(Sheets("客戶明細").Cells(i, 38).Value)) Then
MsgBox (Sheets("客戶明細").Cells(i, 38).Value & "該餐單已到期,請抽單")
End If
Else
Sheets("客戶明細").Cells(i, 45).Value = "用餐中"
End If
Next i
Sub 到期提醒()
Dim i As Long
With Sheets("客戶明細")
For i = 4 To Cells(3, 2).End(xlDown).Row 'Sheets("客戶明細").UsedRange.Rows.Count
If (.Cells(i, 38).Value = Date) Then
MsgBox (.Cells(i, 4).Value & "該餐單已到期,請抽單")