Hello,

I have this code that works:
Code:
Cells(rowj, 4) = objIE.document.getElementById("report_165215891151811269_catch").innerText
But program crashes when it is not present so tried doing it this way and it doesn't work:
HTML also inside

Code:
'<div id="report_165215891151811269_catch"><span class="nodatafound">No Non-Res customer found by the search criteria.</span>
'</div>


Dim nonresidential as Object
Dim rowj as integer ' this is in a for loop to move through rows
nonresidential = objIE.document.getElementById("report_165215891151811269_catch")
If nonresidential Is Nothing Then
Else
Cells(rowj, 4) = objIE.document.getElementById("report_165215891151811269_catch").innerText 
End If
Also why is it that html code would produce an odd name like this: report_165215891151811269_catch for every non residential address- just curious?

Thank you!