By using expertatexcel.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

Become an Σxpert at Σxcel.com

 


IsMissing(var)

This IsMissing() function is used to determine whether an Optional parameter was passed or not


Define the following sub


Sub Test2(s,Optional s2)

if IsMissing(s2) Then
   s2 = "Default"
End if
debug.Print s2

End Sub




And run the following from the
Immediate Window


test2 "the s value"

test2 "svalue", "optional value"