I am trying to implement a code where I can import multiple tables from a website. I am able to do so using the following code. However, the code is too slow.
Sub FetchData()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;%url%", Destination:=Range( _
"$A$1"))
.Name = "xyz"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
Can someone suggest a code that will give the output fast?