Expand Minimize
This topic has not yet been rated - Rate this topic

Optional parameters must specify a default value

Optional parameters must provide default values that can be used if no parameter is supplied by a calling procedure.

Error ID: BC30812

To correct this error

  • Specify default values for optional parameters; for example:

    Sub Proc1(ByVal X As Integer, 
          Optional ByVal Y As String = "Default Value")
       MsgBox("Default argument is: " & Y)
    End Sub
    
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.