Handling "No cells were found." Error in Excel
<p>I am working on Excel VSTO application and finding error cells in the worksheets using the below code</p>

<pre><code>Excel.Range rngTemp;
Excel.Range rngErrorRange;

Excel._Worksheet Sheet1 = (Excel._Worksheet)xlCTA.Sheets["Sheet1"];
rngTemp = wsCTAWK11.UsedRange;
rngErrorRange = rngTemp.SpecialCells(Excel.XlCellType.xlCellTypeFormulas, Excel.XlSpecialCellsValue.xlErrors);
</code></pre>

<p>when there are really error cells found then i do not have any issues but when i dont have any error cells in these sheet i get the below exception</p>

<pre><code>**threw an exception of type 'System.Runtime.InteropServices.COMException'
    base {System.Runtime.InteropServices.ExternalException}: {"No cells were found."}**
</code></pre>

<p>How to handle this... Pls help</p>
