Nelson78
Well-known Member
- Joined
- Sep 11, 2017
- Messages
- 526
- Office Version
- 2007
Hello everybody.
I've a .xlsm folder last saved on 25th October 2019.
Until then, no problem.
Now, I've tried to run a macro without having modified it, but the result is:
run time error '-2146697211 (800c0005)': The system cannot locate the resource specified
in the line
What could it be happened? Perhaps a change in firewall policy by the administrator?
I've a .xlsm folder last saved on 25th October 2019.
Until then, no problem.
Now, I've tried to run a macro without having modified it, but the result is:
run time error '-2146697211 (800c0005)': The system cannot locate the resource specified
in the line
Code:
.send
What could it be happened? Perhaps a change in firewall policy by the administrator?
VBA Code:
Sub getintothewebsite()
Dim URL As String, strResponse As String
Dim objHTTP As Object
Dim city As String
city = Range("B1")
Set HTMLdoc = CreateObject("htmlfile")
URL = "https://it.wikipedia.org/wiki/" & city
Set objHTTP = CreateObject("MSXML2.XMLHTTP")
With objHTTP
.Open "GET", URL, False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.send
strResponse = .responseText
'MsgBox strResponse
Sheets(1).Range("a1") = strResponse
End With
End Sub