The trailing ,
breaks the syntax rules, omit it:
b 1
(Or provide a placeholder b 1, p2:
)
質問
Private Sub a()
b 1,
End Sub
Private Sub b(p1 As Variant, Optional p2 As Variant)
Stop
End Sub
I am Using VBA in Access. I want to have a Procedure with 2 parameters - the last 1 being optional. Why won't Private Sub a() compile.
How do I run a() with a call to b() and pass no parameter as the second argument?
解決
The trailing ,
breaks the syntax rules, omit it:
b 1
(Or provide a placeholder b 1, p2:
)