vba multiple optional arguments code example
Example: vba multiple optional arguments
' 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
Next
End SUb