Reputation: 7909
I am not very familiar with VBA and I have to perform a task that involves opening a number of Excel files. These are full of broken links and I don't have the time to change things. As I open each file, 5(!) message windows pop up, one after another, and to get rid of them I have to hit "OK".
One of the "OK" windows is this:
Wanting to avoid this, I have
Pasted the following code
Sub Appl_Display_Alert_Ex2()
Application.DisplayAlerts = False
ActiveWorkbook.Close
End Sub
And then hit F5 to run it.
However, while I thought that this applied to Excel as a whole, I assume it only applies to the single file, because I then went to open one of my broken files and the 5 windows popped up anyway.
Question: is there a way for me to avoid the "OK" message windows for all Excel files, whatever they are?
Upvotes: 1
Views: 1297
Reputation: 7089
I would strongly advise against doing this, as it's not a good practice - generally it's better to simply fix the formulas/tables to avoid this error - but if you absolutely insist on doing this.
You can go to File -> Options -> Formulas -> Error Checking / Error Checking Rules
and disable whatever checks necessary to avoid this prompt.
What I'd however recommend you to do instead, is to closely follow this article here and fix it the proper way instead!
Upvotes: 4