Hiding Excel warnings during automation

Well, I sorted out my problem of confusing warnings appearing whilst controlling Excel with VBA. Turns out there is an Application.DisplayAlerts property which, when set to false, hides warnings such as the one I was getting. It took a little Googling to find the solution, which wasn’t readily apparently in any of the MS help for the methods I’d got the warnings from.

The other Office applications also have a DisplayAlerts property.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.