OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Alex Shevchuk (ashevchukCORILLIAN.COM)
Date: Tue Jan 08 2002 - 10:57:13 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Hi Vladimir,

    not that I am authority on this issue, but I'll jump in.

    In my experience:

    - If I want to know if user has omitted parameter I use
    Variant:

    Sub Test(Optional ByVal vParam As Variant)
      If IsMissing(vParam) Then
        ' Parameter is missing
      Else
        ' Parameter has been passed
      End If
    End Sub

    - If I want to use some default value in most cases for a parameter,
      I use:

    Sub Test(Optional ByVal bEmployed as Boolean = True)
      ' Do whatever
    End Sub

    Regards,

    Alex Shevchuk

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM