Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range
Dim JIRA As String
Dim JIRALoc As String
Dim JIRAbln As Boolean
Dim YesNo As String
On Error GoTo err_handle
Application.EnableEvents = False
'Pulls up the Calendar for the Script Writing Date and the Script Execution Date
If Target.Address = Sheet28.Range("H7").Address Then
frmCalendar3.Show
Else
If Target.Address = Sheet28.Range("H9").Address Then
frmCalendar4.Show
End If
End If
If Sheet29.Range("Pause_Status") = 1 Then
YesNo = MsgBox("Your script is paused, Do you want to resume?", vbYesNo)
If YesNo = vbYes Then
Run "Pause_Resume"
End If
End If
JIRALoc = Sheet29.Cells(5, 5).Value
If JIRALoc = "" Then
JIRAbln = False
Else
JIRAbln = True
End If
Set Rng = Sheet28.Range("F1:F1000") ' change range as required
'If Not Intersect(Target, Rng) Is Nothing Then
If Intersect(Target, Rng) Is Nothing Then
'do nothing
Else
If Target.Value = "Pass" Then
Target.Offset(0, 3).Value = Application.UserName & " " & Now
Else
End If
If Target.Value = "Fail" Then
Target.Offset(0, 3).Value = Application.UserName & " " & Now
If JIRAbln = True Then
JIRA = MsgBox("Do you need to input a defect in your defect tracking system for this issue?", vbYesNo)
If JIRA = vbYes Then
ThisWorkbook.FollowHyperlink (JIRALoc)
End If
End If
Else
End If
If IsEmpty(Target.Value) Then
Target.Offset(0, 3).ClearContents
Else
End If
End If
clean_up:
Application.EnableEvents = True
Exit Sub
err_handle:
MsgBox Err.Description
Resume clean_up
End Sub