if not(wucode) then
set Report1 = MarketData.GetReportData(Code,Market1)
if i=0 then
MaxVolume = Report1.Volume
end if
If Report1.Volume = MaxVolume Then
MaxCode = Report1.Label
'MaxVolume = Report1.Volume
End if
end if
每次升级后都提示“If Report1.Volume = MaxVolume Then”这句424错误。
MarketData.GetReportData(Code,Market1)
你仔细检查一下 Code,Market1 这两个变量的品种是不是系统里面没有,没有的话Report1 对象就是控制,自然就会出现问题。
为了防止出现异常,建议你的代码中涉及到对象引用时,要加以对象是否为空的判断
set Report1 = MarketData.GetReportData(Code,Market1)
if not(Report1 is nothing) then
'相应的处理
end if