If strCalItem Is Nothing Then
MsgBox "Operation failed. An object could not be found."
End If

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> Hi,
>
[quoted text clipped - 18 lines]
> Thanks
> Long
Long Nguyen - 05 Feb 2004 03:41 GMT
Thanks Sue. But with the code
Set strCalItem = MyFolder.Items("New Request")
If strCalItem Is Nothing Then
MsgBox "Operation failed. An object could not be found."
End If
Outlook displayed the "Object could not be found" when it execute the Set
strCalItem statement, i.e. BEFORE the If check.
Regards
Long
Sue Mosher [MVP] - 05 Feb 2004 13:14 GMT
Make sure you have an On Error Resume Next statement in the procedure's
declarations section.

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> Thanks Sue. But with the code
>
[quoted text clipped - 8 lines]
> Regards
> Long
Long Nguyen - 06 Feb 2004 04:44 GMT
Thanks Sue. I did miss Hour 19 in your books. :-)
Regards
Long
> Make sure you have an On Error Resume Next statement in the procedure's
> declarations section.
[quoted text clipped - 17 lines]
> > Regards
> > Long