J'ai réussi à Patchworker grossièrement différentes méthodes trouvées sur internet et ai réussi à régler mon problème, un grand merci pour vos inputs qui m'ont beaucoup aidé à cerner le problème.
Si ça intéresse quelqu'un voici mon code final:
Sub Macro1()
Dim O As Worksheet 'déclare la variable O (onglet)
Dim DL As Integer 'déclare la variable DL (Dernière Ligne)
Dim xFileName As Variant
Dim Rg As Range
Dim xAddress As String
xFileName = Application.GetOpenFilename("CSV File (*.csv), *.csv", , "Kutools for Excel", , False)
If xFileName = False Then Exit Sub
On Error Resume Next
Set Rg = Application.InputBox("please select a cell to output the data", "Kutools for Excel", Application.ActiveCell.Address, , , , , 8)
On Error GoTo 0
If Rg Is Nothing Then Exit Sub
xAddress = Rg.Address
With ActiveSheet.QueryTables.Add("TEXT;" & xFileName, Range(xAddress))
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 936
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = True
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Application.ScreenUpdating = False 'masque les rafraîchissements d'écran
DL = Cells(Application.Rows.Count, "A").End(xlUp).Row 'définit la dernière ligne éditée DL de la colonne A de l'onglet O
Columns("D:D").Cut 'coupe la colonne D
Columns("B:B").Insert Shift:=xlToRight 'colle la colonne D dans B en décalant a droite
Range("E1:E" & DL).Value = "24" 'écrit 24 dans la colonne E
Range("L1:L" & DL).Value = "0" 'écrit dans 0 la colonne L
Range("M1:M" & DL).Value = "MIRRORED FLOW ON FR37 FOLLOWING FIN IMPLEMENTATION" 'écrit "Mirrord flow..."dans la colonne M
Range("N1:N" & DL).Value = "0" 'écrit 0 dans la colonne N
Rows(1).Delete 'supprime a ligne 1
Application.ScreenUpdating = True 'affiche les rafraîchissements d'écran
End Sub
Macro extrêmement longue j'en conviens xD