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
- UITableView failed to obtain a cell from its dataSource?
- AngularJS–[ng:areq] Argument ‘xxCtrl’ is not a function, got undefined! Error (Fixed)
- 0xc0000005: an access conflict occurred while reading location 0x00000020
- MySQL advanced — Explanation of ref field in explain information
- Errno in Linux Programming
- Python error: typeerror: ‘module’ object is not callable
- LeetCode 23. Merge k Sorted Lists(java)
- (element UI component table) how to add a style to a table
- Python modifies word document content and inserts pictures
- pthread_ Introduction and application of join function
- Usage of NVL in SQL
- Android can’t transfer value when using extras, bundle and intent
- Common errors and modification methods of findbug
- Tensorflow in function tf.Print Method of outputting intermediate value
- java.lang.IllegalStateException Exception: cause analysis and solution
- MySQL partitions the existing tables of the data table
- Numpy realizes the forward propagation process of CNN
- VC + + COM programming error of 0xc0000005: access conflict when reading location 0xfeefef6