Good Morning,
How can I stop the message to show up every time I select a option . i want the message to show up one time only. When F4 = 0
Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveCell.Value = "SICK" And Range("F4") = 0 And Range("G5") <= 0 Then
MsgBox "The employee is out of excused sick days.", vbCritical, "Excused Sick Leave Left"
ElseIf ActiveCell.Value = "FMLA 1 Hours Paid" And Range("F4") = 0 And Range("G5") <= 0 Then
MsgBox "The employee is out of excused sick days.", vbCritical, "Excused Sick Leave Left"
ElseIf ActiveCell.Value = "FMLA 2 Hours Paid" And Range("F4") = 0 And Range("G5") <= 0 Then
MsgBox "The employee is out of excused sick days.", vbCritical, "Excused Sick Leave Left"
ElseIf ActiveCell.Value = "FMLA 3 Hours Paid" And Range("F4") = 0 And Range("G5") <= 0 Then
MsgBox "The employee is out of excused sick days.", vbCritical, "Excused Sick Leave Left"
ElseIf ActiveCell.Value = "FMLA 4 Hours Paid" And Range("F4") = 0 And Range("G5") <= 0 Then
MsgBox "The employee is out of excused sick days.", vbCritical, "Excused Sick Leave Left"
ElseIf ActiveCell.Value = "FMLA 5 Hours Paid" And Range("F4") = 0 And Range("G5") <= 0 Then
MsgBox "The employee is out of excused sick days.", vbCritical, "Excused Sick Leave Left"
ElseIf ActiveCell.Value = "FMLA 6 Hours Paid" And Range("F4") = 0 And Range("G5") <= 0 Then
MsgBox "The employee is out of excused sick days.", vbCritical, "Excused Sick Leave Left"
ElseIf ActiveCell.Value = "FMLA 7 Hours Paid" And Range("F4") = 0 And Range("G5") <= 0 Then
MsgBox "The employee is out of excused sick days.", vbCritical, "Excused Sick Leave Left"
ElseIf ActiveCell.Value = "FMLA 8 Hours Paid" And Range("F4") = 0 And Range("G5") <= 0 Then
MsgBox "The employee is out of excused sick days.", vbCritical, "Excused Sick Leave Left"
End If
End Sub
Bookmarks