ISERROR(expression)

Returns the value True or False depending if the expression is an error (Boolean).


expressionThe expression to test.

REMARKS
* Error values can be explicitly created using the CVErr() function.
* You can use the ISARRAY function to return True or False depending if the value is an array.
* You can use the ISDATE function to return True or False depending if the value is a date.
* You can use the ISNULL function to return True or False depending if the value contains no data.
* You can use the ISNUMERIC function to return True or False depending if the value is a number.
* The equivalent .NET function is Microsoft.VisualBasic.Information.IsError
* For the Microsoft documentation refer to docs.microsoft.com

Debug.Print IsError(CVErr(6)) ' True  
Debug.Print IsError(CVErr(11)) ' True
Debug.Print IsError(CVErr(55)) ' True
Debug.Print IsError(Error(6)) ' False
Debug.Print IsError(CVErr(-100)) ' generates an Invalid Procedure Call or Argument run-time error
Debug.Print IsError(10/ 0) ' generates a Division by Zero run-time error

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top