|
win7运行excel2010发现报错了,“系统未找到指定的资源”,.send标黄,如何解决?
Public Sub TimerProc(Optional sA2 As Integer = 30)
Dim Q As Long, dm As String, url As String, sSp() As String
[E1].Value = [E1].Value + 1
For Q = 4 To Range("A1").CurrentRegion.Rows.Count
VBA.DoEvents
dm = Cells(Q, 1).Value
If Val(dm) < 600000 Then
url = "http://qt.gtimg.cn/q=ff_sz" & dm
Else
url = "http://qt.gtimg.cn/q=ff_sh" & dm
End If
With CreateObject("msxml2.xmlhttp")
.Open "get", url, False
.send
sSp = Split(.responsetext, "~")
If UBound(sSp) > 1 Then
Cells(Q, 2).Value = sSp(12) '名称
Cells(Q, 9).Value = sSp(1) '现价
Cells(Q, 10).Value = sSp(2) '昨收
Cells(Q, 11).Value = sSp(3) '金开
Cells(Q, 12).Value = sSp(4) '涨跌
Cells(Q, 13).Value = sSp(5) '涨跌幅
Cells(Q, 14).Value = sSp(6) '最高
Cells(Q, 15).Value = sSp(7) '最低
Cells(Q, 16).Value = sSp(8) '振幅
Cells(Q, 17).Value = sSp(9) '换手率
'Cells(q, 18).Value = ssp(39) '市盈率
'Cells(q, 14).Value = ssp(36) '成交量
'Cells(q, 15).Value = ssp(37) '成交量
'Cells(q, 16).Value = ssp(44) '流通市值
'Cells(q, 17).Value = ssp(45) '总市值
'Cells(q, 18).Value = ssp(47) '涨停
'Cells(q, 19).Value = ssp(48) '跌停
|
|