导出的EXCEL股票代码联动股票软件的方法
-
相关简介:股票代码联动
-
文章来源:股海网作者:股海网发布时间:2020-08-19浏览次数:
缘起:
我经常导出一些选股啊之类的股票列表到EXCEL,我想点击股票代码,股票软件也跟着变化,至于为什么有这个需求,是因为某信软件能按指标数值排序,但不能和K线窗口并显,只能把排序数据导出,导出后我还想按顺序查看每只股票
经过研究,方法如下:
Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long
Private Declare Function PostMessage& Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any)
Public nMsg As Long
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
nMsg = RegisterWindowMessage("Stock")
If Left(Target, 1) = "6" Then
data = 7000000
Else
data = 6000000
End If
PostMessage 65535, nMsg, data + Target, 0
End Sub
考虑到可能很多朋友会用到,特分享出来
上一篇:折腾必备OD使用视频教程
下一篇:通达信超赢V751和谐步骤教程