Sub WORKBOOK_OPEN()
Sheets("sheet1").Visible = True
Sheets("sheet1").Select
If Time <= TimeValue("05:00 am") Then
Call SendEMail3
End If
Application.Wait (Now + TimeValue("0:05:00"))
ActiveWorkbook.Close savechanges:=True
Application.Quit
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G3:G52")) Is Nothing And Target.Value <> "" Then
Call SendEMail1
ElseIf Not Intersect(Target, Range("M3:M52")) Is Nothing And UCase(Target.Value) = "YES" Then
Call SendEMail2
ElseIf Not Intersect(Target, Range("W3:W52")) Is Nothing And UCase(Target.Value) = "YES" Then
Call SendEMail4
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G3:G52")) Is Nothing And Target.Value <> "" Then
Call SendEMail1
ElseIf Not Intersect(Target, Range("M3:M52")) Is Nothing And UCase(Target.Value) = "YES" Then
Call SendEMail2
Sheets("Sheet" & Target.Row - 1).PrintOut
ElseIf Not Intersect(Target, Range("W3:W52")) Is Nothing And UCase(Target.Value) = "YES" Then
Call SendEMail4
End If
End Sub