VBA ISMISSING Function

HomeVBA Functions LIST (Category Wise)How to use the VBA ISMISSING Function (Syntax + Example)

What is VBA ISMISSING Function

The VBA ISMISSING function is listed under the information category of VBA functions. When you use it in a VBA code, it evaluates that if an optional argument is missing from the procedure and returns TRUE if it is else FALSE.

how to use it

To use VBA's ISMISSING function you need to understand its syntax and arguments:

Syntax

IsMissing(ArgName)

Arguments

  • ArgName: The name of the argument (Optional) that you want to test if it’s supplied or not.

Example to use ISMISSING Function in VBA

To practically understand how to use VBA ISMISSING function, you need to go through the below example where we have written a vba code by using it:

Sub example_ISMISSING(Optional myArg As Variant)
Range("A1").Value = IsMissing(myArg)
End Sub

In the above code, we have used ISMISSING to check the argument myArg is missing or not and as we don't specify anything for it, the function returns TRUE in the result.

Related Functions

About the Author

puneet one point one

Puneet is using Excel since his college days. He helped thousands of people to understand the power of the spreadsheets and learn Microsoft Excel. You can find him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.