如何测试是否提供了可选参数? - 在VB6/VBA中
Function func (Optional ByRef arg As Variant = Nothing)
If arg Is Nothing Then <----- run-time error 424 "object required"
MsgBox "NOT SENT"
End If
End Function
Run Code Online (Sandbox Code Playgroud)