Re: sub or function not defined. not sure what to do to fix it.



I'm not sure what to do to fix it, either.

strText

is, presumably, the line that causes the problem. What do you think it should do?

--
Enjoy,
Tony

"Dickery1" <junkone1@xxxxxxxxx> wrote in message news:008719a3-cfa3-4d84-a7fa-cb48e6d822e2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
get the following error and am stuck, compile error
sub or function not defined. not sure what to do to fix it.

Sub MovePastDate2Today()
Dim t As TaskItem
Set f =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks)
strText
For Each t In f.Items
If (t.DueDate < DateAdd("d", 2, Now)) Then
strText = strText & (t.t.DueDate)


End


MsgBox strText


Next


On Error GoTo MovePastDate2Today_Error


MovePastDate2Today_Error:
MsgBox "Error " & Err.Number & "(" & Err.Description & ")"


End Sub





.