Code:
Function pullDataSingleURL(URL As String, ws As Worksheet)
[COLOR=#ff0000]Dim httpRequest As XMLHTTP 'XML V6.0[/COLOR]
Dim DataObj As New MSForms.DataObject 'Forms 2.0
Set httpRequest = New XMLHTTP
httpRequest.Open "GET", URL, False
httpRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
httpRequest.send ""
DataObj.SetText httpRequest.responseText
DataObj.PutInClipboard
DoEvents
With ws
.Activate
.Cells.Clear
.Cells(1, 1).Select
.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
End With
End Function
This code works fine on my computer and a co-workers computer, but it breaks at the highlighted red line when its run by our boss. figures, right?
The following references are enabled:
http://imgur.com/izV45Eo
Last edited: