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

我正在尝试debugging这个简单的代码部分:

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 

你需要调用VarType函数传给它一个实际的variables