我写了像
这样的代码sub something
Dim symbols as Symboldetail
Dim errorSymbols as Symboldetail
Dim anyError as boolean
Dim name, id as String
set symbols = new Symboldetail
set errorSymbols = new Symboldetail
anyerror = funName("","",symbols ,errorSymbols)
end sub
Function funName(ByVal name As String,ByVal id As String, ByRef symbols as Symboldetail,ByRef errorSymbols as Symboldetail) As Boolean
'here editing the values of symbols and errorSymbols
funName = false/true
end Fuction
当我编译此代码时,它会抛出错误" ByRef参数类型不匹配"
我不知道我在做什么是
提前致谢
答案 0 :(得分:1)
我开始知道我做了什么错误
'i declared these variables like
Dim symbols, errorSymbols as Symboldetail
'instead of
'Dim symbols as Symboldetail
'Dim errorSymbols as Symboldetail
所以它将符号作为变量而不是Symboldetails,因为当我传递变量时它会将错误抛出为“类型错误匹配错误”
@all感谢您的宝贵意见