更新时间:2023-11-27 17:31:46
使用IsMissing
:
If IsMissing(arg) Then
MsgBox "Parameter arg not passed"
End If
但是,如果我没记错的话,在为该参数提供默认值时,这是行不通的,在任何情况下,使用默认参数都是相当多余的.
However, if I remember correctly, this doesn’t work when giving a default for the argument, and in any case it makes using the default argument rather redundant.