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 ?
TrustATrader. TrustATrader is a site that was set up to compete directly with Checkatrade. While they have less advertising, they have a better reputation with Trustpilot. So you might get fewer leads, but the leads you get should be more solid.
Yes, it's absolutely worth joining Check A Trade even if you have much work on. This is because the site does more than just find tradespeople work. It helps to establish them as trustworthy professionals, and essentially works as a form of online word of mouth.
Check with your local council Trading Standards is a council department that makes sure companies don't break the law when selling to customers. The council might list traders they've approved, or they might link to another website that lists traders in your area you can trust.
You first need to check that the cell does contain an error:
If IsError(MyTab(i, j).Value) Then
If MyTab(i, j).Value <> CVErr(xlErrNA) Then
Unless you do want to know the type of error (#N/A, #DIV/0!, etc) , you might as well replace your test with:
If (Not IsEmpty(MyTab.value)) And (Not IsError(MyTab(i, j).value)) Then
If you need to check the error type, you can write:
Dim shouldBuildRequest As Boolean
shouldBuildRequest = Not IsEmpty(MyTab.value)
If IsError(MyTab(i, j).Value) Then
shouldBuildRequest = shouldBuildRequest AND (MyTab(i, j).Value <> CVErr(xlErrNA))
End If
If shouldBuildRequest Then
Call BuildRequest(False, id, MyTab, i, j)
End If
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With