Option Explicit
Sub Macro1()
Dim i As Long
Cells.Select
For i = 1 To ActiveSheet.QueryTables.Count
ActiveSheet.QueryTables(i).Delete
Next i
Selection.ClearContents
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://it.investing.com/commodities/brent-oil-historical-data", _
Destination:=Range("$A$1"))
' .CommandType = 0 'Disabilitare
.Name = "brent-oil-historical-data"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
'------------------------------------
.WebSelectionType = xlSpecifiedTables
.WebTables = "3,4"
'------------------------------------
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = False
.WebConsecutiveDelimitersAsOne = False
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub