Cell Error Values
You can insert a cell error value into a cell or test the value of a cell for an error value by using the CVErr function. The cell error values can be one of the following XlCVError constants.
Constant | Error number | Cell error value |
---|---|---|
xlErrDiv0 | 2007 | #DIV/0! |
xlErrNA | 2042 | #N/A |
xlErrName | 2029 | #NAME? |
xlErrNull | 2000 | #NULL! |
xlErrNum | 2036 | #NUM! |
xlErrRef | 2023 | #REF! |
xlErrValue | 2015 | #VALUE! |
Example
This example inserts the seven cell error values into cells A1:A7 on Sheet1.
|
This example displays a message if the active cell on Sheet1 contains a cell error value. You can use this example as a framework for a cell-error-value error handler.
|