D
Dickery1
Hello
I have a fully working code but for some reason it still triggers the
err block. can someone tell me why. I get a msgbox with Error 0 in it.
i thoght that they get triggered only if there is a error.
Sub MovePastDate2Today()
On Error GoTo MovePastDate2Today_Error
Dim t As TaskItem
Set f =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks)
strText = ""
For Each t In f.Items
If (t.DueDate < Date And Not (t.Status = olTaskComplete)) Then
'strText = strText & (t.DueDate) & " "
t.DueDate = Date
t.Save
End If
Next
'MsgBox strText
'MsgBox Date
MovePastDate2Today_Error:
MsgBox "Error " & Err.Number & "(" & Err.Description & ")"
End Sub
I have a fully working code but for some reason it still triggers the
err block. can someone tell me why. I get a msgbox with Error 0 in it.
i thoght that they get triggered only if there is a error.
Sub MovePastDate2Today()
On Error GoTo MovePastDate2Today_Error
Dim t As TaskItem
Set f =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks)
strText = ""
For Each t In f.Items
If (t.DueDate < Date And Not (t.Status = olTaskComplete)) Then
'strText = strText & (t.DueDate) & " "
t.DueDate = Date
t.Save
End If
Next
'MsgBox strText
'MsgBox Date
MovePastDate2Today_Error:
MsgBox "Error " & Err.Number & "(" & Err.Description & ")"
End Sub