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

948 Steps to 6 Figures by Learning Excel-VBA and Other Skills



Step 780 - 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"





   Table of Contents | Send us your feedback | © 2025 All Rights Reserved | Edit