Sub SendExpirationEmails()
Dim RptPeriod As Date: RptPeriod = Application.WorksheetFunction.EoMonth(wsControl.Range("LastRptPeriod"), 0)
Dim tbl As ListObject:
'UI Confirm
If MsgBox("Have you switched to Expense Reports Email Account?", vbYesNo, "Confirm Emails") = vbNo Then
MsgBox "Process Aborted."
Exit Sub
End If
If MsgBox("This process will send emails to all expiring budgets. Are you sure you want to continue?", vbYesNo, "Confirm Emails") = vbNo Then
MsgBox "Process Aborted."
Exit Sub
End If
Sub SendExpirationEmails(UI_Confirm As Boolean)
Dim RptPeriod As Date: RptPeriod = Application.WorksheetFunction.EoMonth(wsControl.Range("LastRptPeriod"), 0)
Dim tbl As ListObject:
'UI Confirm
If UI_Confirm = True Then
If MsgBox("Have you switched to Expense Reports Email Account?", vbYesNo, "Confirm Emails") = vbNo Then
MsgBox "Process Aborted."
Exit Sub
End If
If MsgBox("This process will send emails to all expiring budgets. Are you sure you want to continue?", vbYesNo, "Confirm Emails") = vbNo Then
MsgBox "Process Aborted."
Exit Sub
End If
End If
If Day(Date) <= 23 Then
Call SendExpirationEmails(False)
End If
Call SendExpirationEmails(True)
MsgBox "Process Complete", vbInformation, "Email Process Complete"
If UI_Confirm = True Then
MsgBox "Process Complete", vbInformation, "Email Process Complete"
End If