所以基本上我正在努力做到以下几点:
现在,一旦定义了自定义范围,我将使用另一个私有子来分析在该特定范围内是否满足所需条件(由输入框定义)。
以下是我目前正在使用的代码。
Private Sub Worksheet_Activate()
Dim x As Range
Set x = Application.InputBox(prompt:="Please select the range you want to be verified for results", Title:="Notifier", Default:="Ex: $A$5:$B$30", Type:=8)
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim A As Range
Dim r As Range
Set objShell = CreateObject("Wscript.Shell")
Set A = x.Range
If Intersect(Target, A) Is Nothing Then Exit Sub
For Each r In Target
If r.Value = "FAIL" Then
intMessage = MsgBox("Please be aware that you have marked one of the required verification points as [Fail]" & vbCr _
& vbCr _
& "To improve the visibility over this issue please submit a new Jira ticket for it." & vbCr _
& vbCr _
& "Would you like to create the ticket now?", _
vbYesNo, "Notifier")
If intMessage = vbYes Then
objShell.Run ("https://custom_link")
Else
End If
End If
Next r
End Sub