I have a private procedure in a VBA script for MS Access:
Private Sub drawLineDiagram(chartSpace As Variant, title As String, caption As String, x_val() As Variant, y_val() As Variant, Optional y_val2() As Variant = ????)
As you can see, I want to have an optional last parameter for an array of values.
Which default parameter should be assigned? If I do this with an optional integer value and assign it, for example. 0 everything is fine.
If I do this using an array, as shown above, and assign an array, the line will be marked in red => as an error (and it will not compile).
vba parameters default optional
Sebastian
source share