Hello everyone,
I have really enjoyed finding answers to my issues, looking at past threads on this forum in the past. However, I am at a loss with this current issue.
I have a run time error 13 type mismatch when I run my VBA macro and it blocks on the following line:
Basically, whenever there is a change in column Y, the macro is run but it blocks on that line.
Please find below the longer version of the code, it may be helpful.
Thanks a lot for your help, I have been looking for an answer for a while and I can't seem to solve this issue...
I have really enjoyed finding answers to my issues, looking at past threads on this forum in the past. However, I am at a loss with this current issue.
I have a run time error 13 type mismatch when I run my VBA macro and it blocks on the following line:
Code:
Z = AddOlTask(Range(Target.Address).Offset(0, -6).Value & " " & Range(Target.Address).Value, "https://MYWEBSITE.com/admin/ticket.php?id=" & Range(Target.Address).Offset(0, -6), Now, Now)
MsgBox "Action for ticket " & Range(Target.Address).Offset(0, -6).Value & " has been added to the todo list."
Basically, whenever there is a change in column Y, the macro is run but it blocks on that line.
Please find below the longer version of the code, it may be helpful.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("Y:Y")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
If CStr(Range(Target.Address).Offset(0, 1).Value) = "Yes" Then
Z = AddOlTask(Range(Target.Address).Offset(0, -6).Value & " " & Range(Target.Address).Value, "https://MYWEBSITE.com/admin/ticket.php?id=" & Range(Target.Address).Offset(0, -6), Now, Now)
MsgBox "Action for ticket " & Range(Target.Address).Offset(0, -6).Value & " has been added to the todo list."
End If
End If
End Sub
Thanks a lot for your help, I have been looking for an answer for a while and I can't seem to solve this issue...