I want to check a #N/A
value into excel with VBA. So after some research, I made this code :
Set MyTab = Range(name)
If (Not IsEmpty(MyTab.value)) And (MyTab(i, j).value <> CVErr(xlErrNA)) Then
Call BuildRequest(False, id, MyTab, i, j)
End If
But when it passed on MyTab(i, j).value <> CVErr(xlErrNA)
I have an error 13(type error)
and I don't find why.
Anyone can help me plz ?
You first need to check that the cell does contain an error:
Unless you do want to know the type of error (#N/A, #DIV/0!, etc) , you might as well replace your test with:
If you need to check the error type, you can write:
Another way to check for the error