[Visual Basic] 复制代码 clpstr="block_jj>>吃鸡鸡备|SZ,002423|SH,601901" openbkw=Replace(Replace(clpstr,"block_jj>>","")," ","")'
openbkw=Split(openbkw,"|")
klear= Cdate(Date) & " " &Cdate(time) & "收到加入板块指令》"&cstr(UBound(openbkw,1))&" "
Application.msgout klear&clpstr
call SetClipboardText(klear)
if UBound(openbkw,1)>=1 then
Set gtob = CreateObject("Stock.Block")
call gtob.Open(openbkw(0),1) ' 打开板块对象
zongsh=gtob.Count()
Application.msgout Cdate(Date) & " " &Cdate(time) & "收到加入板块指令》目标板块【"&openbkw(0)&"】板块已有股票数 " &cstr(zongsh)&" 支"
jis=1
For Each KJIA IN openbkw
if jis>1 then
gupiao=Split(KJIA,",")
if UBound(gupiao,1)>=1 then
call gtob.AddStock(gupiao(0),gupiao(1))
zongsssh=gtob.Count()
Application.msgout Cdate(Date) & " " &Cdate(time) & gupiao(1)&"加入板块【"&openbkw(0)&"】当前股票共 " &cstr(zongsssh)&" 支"
end if
end if
jis=jis+1
NEXT
Set b = nothing
Set gtob = nothing
end if
补充内容 (2024-4-19 14:45):
添加股票到目标板块无效,在列表打开该板块,没有找到新添加的个股 |