I want to eliminate the little green triangles that warn the user about possible errors. I know I can accomplish this via VBA as follows:
My question is: how can I do this without looping over all cells in the range?
Here's a way to do this in the user interface: I select a cell with the error triangle, then type CTRL+A, then I click the little yellow diamond with the exclamation point, then choose Ignore Error. Then the entire range is cleared of the green triangles. Unfortunately, the macro recorder doesn't record anything for this action.
The reason I need this in one statement (or a few statements) rather than one per cell is I'm accessing Excel through a .NET to COM interop layer which slows things down by a factor of ~200. MyRange can contain hundreds of thousands of cells, so it's imperative to keep the number of individual calls as small as possible.
I know it would be possible to turn off error checking globally:
But I think it's a bad idea to mess with a user's settings solely for the sake of viewing an individual document. The end point of my program is create an Excel workbook, after which the user can do whatever they want with the workbook (save or discard). So there would be no opportunity to turn error checking back on.
Bookmarks