Give us more detail. Version of Excel/Outlook, along with any other pertinent detail.
If you have access to MS Flow. I'd recommend using that to save attachments to OneDrive. Rather than using VBA. Since Flow, unlike VBA can be triggered on email arrival and does not need to scan folder for emails meeting condition. It's more secure and faster way to save attachments.