欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件高级功能研发区 → 区分reportnotify里面的reportdata

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有2818人关注过本帖树形打印复制链接

主题:区分reportnotify里面的reportdata

帅哥哟,离线,有人找我吗?
李亚弟
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:198 积分:745 威望:0 精华:0 注册:2013/1/15 22:12:44
区分reportnotify里面的reportdata  发帖心情 Post By:2014/2/27 9:24:46 [显示全部帖子]

代码:

Sub UserForm1_CommandButton1_Click()
    call marketdata.RegReportNotify("cu00","sy")
    call marketdata.RegReportNotify("ag00","sy")
End Sub
sub marketdata_reportnotify(reportdata)
    dim newprice_cu,newprice_ag
    if reportdata.label="cu00" then
       newprice_cu=reportdata.newprice
       application.MsgOut "newprice_cu:"& newprice_cu
    else
       newprice_ag=reportdata.newprice
       application.MsgOut "newprice_ag:"& newprice_ag
    end if
end sub


Sub UserForm1_CommandButton2_Click()
    application.MsgOut time
    call marketdata.UnRegReportNotify("cu00","sy")
    call marketdata.UnRegReportNotify("ag00","sy")
End Sub

 

执行效果:

newprice_ag:4316
newprice_ag:4316
newprice_ag:49560
newprice_ag:4316
newprice_ag:4315
newprice_ag:49560
newprice_ag:4315

 

也就是说,label这个属性并没有起到区分两个品种的作用。那该怎么样才能区分呢?


 回到顶部
帅哥哟,离线,有人找我吗?
李亚弟
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:198 积分:745 威望:0 精华:0 注册:2013/1/15 22:12:44
  发帖心情 Post By:2014/2/28 9:21:19 [显示全部帖子]

是"AG00""CU00",不是"ag00""cu00"


 回到顶部