从Windows8 32位将系统更新为Windows10 64位后Excel宏不工作
我在Windows8 32位系统中使用了下面的代码,它工作正常,但同样的代码在Windows10 64位系统中不工作从Windows8 32位将系统更新为Windows10 64位后Excel宏不工作,excel,vba,msxml2,Excel,Vba,Msxml2,我在Windows8 32位系统中使用了下面的代码,它工作正常,但同样的代码在Windows10 64位系统中不工作 URL = "https://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/GetQuote.jsp?symbol=" & scripID & Chr(38) & "illiquid=0" & Chr(38) & "smeFlag=0" & Chr(38)
URL = "https://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/GetQuote.jsp?symbol=" & scripID & Chr(38) & "illiquid=0" & Chr(38) & "smeFlag=0" & Chr(38) & "itpFlag=0"
Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP.6.0")
xmlHttp.Open "GET", URL, False
xmlHttp.send
sNo = InStr(1, xmlHttp.responseText, "id=" & Chr(34) & "responseDiv")
getNSEData = Trim(Mid(xmlHttp.responseText, sNo, InStr(sNo, xmlHttp.responseText, "/div>") - sNo))
我试图通过在“C:\Windows\System32\”和“C:\Windows\SysWOW64\”中复制文件在系统中安装msxml2.dll。但问题还是来了
我需要Windows10 64位系统的上述代码的替代项。无法工作和出现问题不能充分描述问题。运行宏后,运行代码需要很长时间,并且没有数据从web获取到excel。
URL = "https://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/GetQuote.jsp?symbol=" & scripID & Chr(38) & "illiquid=0" & Chr(38) & "smeFlag=0" & Chr(38) & "itpFlag=0"
Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP.6.0")
xmlHttp.Open "GET", URL, False
xmlHttp.send
sNo = InStr(1, xmlHttp.responseText, "id=" & Chr(34) & "responseDiv")
getNSEData = Trim(Mid(xmlHttp.responseText, sNo, InStr(sNo, xmlHttp.responseText, "/div>") - sNo))