When we use Excel’s built-in functions to return A Value, if the argument is wrong or cannot be found, we often return #N/A or #Value! And so on prompt message.
Can the VBA code we write in the module also return this information?
The answer is yes, because the code in the module itself can be called within the formula, so naturally this information can also be returned.
However, it is important to note that this information is not text, it is a built-in error value!
The following table shows some commonly used error values for reference:
Can the VBA code we write in the module also return this information?
The answer is yes, because the code in the module itself can be called within the formula, so naturally this information can also be returned.
However, it is important to note that this information is not text, it is a built-in error value!
The following table shows some commonly used error values for reference:
Constant td> | Error Number td> | Cell Error value td> tr> |
xlErrDiv0 td> | 2007 td> | 0 # DIV /! |
xlErrNA | 2042 | #N/A |
xlErrName | 2029 | #NAME? |
xlErrNull | 2000 | #NULL! |
xlErrNum | 2036 | #NUM! |
xlErrRef | 2023 | #REF! |
xlErrValue | 2015 | #VALUE! |
returns the value by calling CVErr(error constant), so what you see on the interface is the error value we want to display.
Such as:
CVErr(xlErrValue)
Read More:
- Excel VBA: cell error value
- VBA error values in Excel
- VBA 400 error
- excel VBA: Could not complete due to error 800a0011
- @Value gets the configuration file value and returns null
- torch.cuda.is_ Available() returns false
- VBA “user defined type not defined” MSXML2.DOMDocument
- Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://xxx.cn’) does n
- About MySQL error: subquery returns more than 1 row
- RegOpenKeyEx returns error value 5
- libxx.so: undefined reference, vector.reserve(n) [How to Solve]
- MySQL advanced — Explanation of ref field in explain information
- The method of constructing even order magic square (n = 4 * m)
- Java regular matching returns all matches
- Cannot read property ‘i18n‘ of undefined
- After the model is instantiated by keras, the result returns nonetype
- Error server returns invalid timezone. Need to set ‘servertimezone’ property
- Python TCP socket programming: send returns broken pipe error?
- Opencv’s imread() function returns null when reading images