IsMissing Function

The IsMissing() function is used to test whether an argument is present or not.
This function can only be used with oarameters that are declared as variant.
These variant datatypes can then be converted to other datatypes using the datatype conversion functions.
This function can be used to test for optional parameters.
When using the IsMissing function the variable must always be declared as variant.
This function does not work on simple data types (like Integer, String, Date) but does work on Variant.


Public Sub Procedure_One() 
   Call Procedure_Two("Times New Roman", 20)
End Sub

Public Sub Procedure_Two(Optional ByVal sFontName As String = "Arial", _
                         Optional ByVal vFontSize As Variant)

   If Not IsMissing(vFontSize) = True Then
   End If
End Sub


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