By using expertatexcel.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

Become an Σxpert at Σxcel.com

 


WebQuery - internet - udf - run a url and loads the output to a worksheet - recorded

Record the code via


Sub WebQuery(sURL)

CreateSheet "WebQuery"

With ActiveSheet.QueryTables.Add(Connection:="URL;" & sURL, destination:=Range("$A$2")
    .name="trades_1"
    .FieldNames= True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True
    .RefreshOnFileOpen = False
...
    .Refresh BackgroundQuery:= True
End with

End Sub