以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  高级功能研发区  (http://www.weistock.com/bbs/list.asp?boardid=5)
----  MarketData.GetReportDataByIndex 方法问题 急切求教  (http://www.weistock.com/bbs/dispbbs.asp?boardid=5&id=6588)

--  作者:francus
--  发布时间:2011/5/19 23:00:34
--  MarketData.GetReportDataByIndex 方法问题 急切求教

count = marketdata.GetReportCount("DQ")

for i =0 to count
   Set Report1 = MarketData.GetReportDataByIndex("DQ",i)  \'获取知道市场索引号为i的reportdata对象
      stockname = Report1.stockname
   if stockname = "AX0109"   then
    msgbox "该品种已经存在!!"
    exit sub
   end if
  next

 

划线处提示 缺少对象 : “report1 ”, 请高手看看怎么回事?


--  作者:阿火
--  发布时间:2011/5/20 8:11:33
--  
for i =0 to count-1

--  作者:francus
--  发布时间:2011/5/20 14:55:32
--  

哦,可以啦,谢谢啦,哈哈,

 


--  作者:francus
--  发布时间:2011/5/20 15:07:24
--  

sub text001()
  MyMarket = "dq"
  MyCode = "ax09"
  \'判断该品种是否已经存在,存在则退出,返回消息提示
  count = marketdata.GetReportCount(MyMarket)
  \'遍历市场品种代码
  for i =0 to count-1
   Set report = MarketData.GetReportDataByIndex(MyMarket,i)  \'获取知道市场索引号为i的report对象
  
   if MyCode = report.Label    then
    msgbox "该套利组合已经存在!!"
    exit sub
  end if
    next
 application.MsgOut count & "     " & stockname
end sub

 

为什么这个却提示,对象不支持此属性或方法??? 我认为是一样的呀


--  作者:阿火
--  发布时间:2011/5/20 23:18:30
--  
report 系统自带的关键字吧 用report1
--  作者:francus
--  发布时间:2011/5/21 14:04:41
--  

用report1可以了,但在系统编程帮助文件中找不到report关键字,它到底是什么?