About IsMissing() :

IsMissing is a VBA Function to Check , weather an optional arguments is supplied or not in the function.
“To use Ismissing  your optional argument must be Variant Type , if you argument is not variant type Ismissing will not work on that.
Because Everything except variant have it defaut value Like :”
integer = 0
String =””
Object = Nothing
you can check the Function below :


Function Main()
    Call Test
    Call Test2
End Function
Function Test(Optional lngMyVal As Long) As Long
    If IsMissing(lngMyVal) Then Stop
End Function
Function Test2(Optional MyVal) As Long
    If IsMissing(MyVal) Then Stop
End Function
 Enjoy Reading

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s