Bonjour
j'utilise VBA pour importer des données du web via une commande VBA, sauf que quand j’exécute le code:
Sub WEB()
'
' Macro1 Macro
'
'
Sheets("WEB").Cells.Clear
With Sheets("WEB").QueryTables.Add(Connection:= _
"URL;https://www.investing.com/currencies/eur-usd-historical-data", _
Destination:=Sheets("WEB").Range("$A$432"))
.CommandType = 0
.Name = "eur-usd-historical-data_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
For Ligne = 1 To 1000
If Left(Sheets("WEB").Cells(Ligne, 1, 13)) = "Download Data" Then
Sheets("FX").Cells(1, 1) = Sheets("WEB").Cells(Ligne + 2, 1)
End If
une erreur de compilation: argument non facultatif et le mot Sub WEB() est colorié en jaune
comment je peux corriger l'erreur
merci