[VBA Excel] BackgroundQuery et protection de la feuille
Bonjour,
J'ai une feuille protégée par un mot de passe et celà fait planter ma macro qui va ouvrir une page Web pour récupérer des informations (fichier .csv).
L'erreur est 1004 et c'est sur .Refresh BackgroundQuery:=False.
Quelqu'un sait comment je peux ne pas protéger cette propriété ?
Voici le code de ma fonction :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| With Me.QueryTables.Add(Connection:="TEXT;" & "http://xxxxxxxxxxxxxxxx", _
Destination:=Range(Chr(64 + ValeursTemp_colonne) & ValeursTemp_ligne))
.Name = "Temporary_data"
.FieldNames = False
.RowNumbers = False
.FillAdjacentFormulas = True
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1)
.Refresh BackgroundQuery:=False
End With |
Merci beaucoup,
Worldofdada