更新时间:2023-11-27 19:07:10
使用 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.