若無持倉,查詢持倉的結果是0,還是空
作者:金字塔 來源:cxh99.com 發布時間:2016年03月13日
- 咨詢內容:
Sub GetHoldByCode(sAccount,sCode,sMarket) dim i dim BuyHolding dim BuyCost dim BuyTodayHolding dim SellHolding dim SellCost dim SellTodayHolding dim PNL dim UseMargin dim Code dim Market On Error resume Next AccountStatus=Order.Account2(2,sAccount) '檢測賬戶是否登陸,如果沒有登陸就退出 'application.MsgOut sCode & "," & sMarket & "," & sAccount & ",NextCode:" & NextCode & ",賬戶狀態:" & AccountStatus if AccountStatus=255 Or AccountStatus="" then exit sub end if Call Order.HoldingInfoByCode2(sCode,sMarket,BuyHolding,BuyCost,BuyTodayHolding,SellHolding,SellCost,SellTodayHolding,PNL,UseMargin,sAccount) BuyHold=BuyHolding SellHold=SellHolding
End Sub
這段代碼是用來查賬戶持倉的,請問,若賬戶沒有持倉,那BuyHold的值是0,還是為空。若為空值,如何轉為0
- 金字塔客服:
http://www.weistock.com:8080/vip/forum.php?mod=viewthread&tid=1557&extra=page%3D1