简体   繁体   English

VBA“编译错误:参数不可选”调试子

[英]VBA “Compile error: Argument not optional” debugging sub

I am trying to debug this simple section of code: 我正在尝试调试此简单的代码部分:

Public Sub FunctionNotValidVarType()
MsgBox "VarType " & VarType & " is not supported. Please check spelling."
End Sub
Public Sub FunctionNotValidVarType()
Dim variable As Integer
variable = 2
MsgBox "VarType " & VarType(variable) & " is not supported. Please check spelling."
End Sub

You need to call the VarType function passing to it an actual variable 您需要调用将实际变量传递给它的VarType函数

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM