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
"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