You need to use a countdown loop instead:

c = MyFolder.Items.Count
For i = c to 1 Step -1
Set MailItem = MyFolder.Items(i)
MailItem.Delete
Next
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54

"Luis" <Luis@discussions.microsoft.com> wrote in message news:73BD0B3D-31E6-40B9-96A9-C7C660AF1CA3@microsoft.com...
> Can someone let me know how to delete four messages in a Folder? I have tried
> to find information on it but there is not VBA code samples. Use the code
> below but it does not delete all the messages.
>
> For Each MailItem In MyFolder.Items
> Debug.Print MailItem.Delete
> Next MailItem
>
> Any suggestions and/or guidance will be helpfull.
>
> Luis
20 JunDelete Message with VBA.Luis
20 Jun|- Re: Delete Message with VBA.Dmitry Streblechenko
20 Jun\ Re: Delete Message with VBA.Sue Mosher [MVP-Outlook]
All times are in (US) Eastern Daylight Time (GMT -4:00)