vba multiple optional arguments

The solution for “vba multiple optional arguments” can be found here. The following code will assist you in solving the problem.

‘ Use a ParamArray
Sub Test(ByVal pArg As String, ParamArray pParameters() As Variant)
‘ Can’t be combined with ‘Optional’ arguments
Dim sValues
For Each sValues In pParameters
Debug.print sValues
End SUb

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts