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 |