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

948 Steps to 6 Figures by Learning Excel-VBA and Other Skills



Step 532 - 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

    

   Table of Contents | Send us your feedback | © 2025 All Rights Reserved | Edit