Hello,
Oui il manque l'antislash (\) à la fin de tes chemins de dossier.
Soit tu l'ajoutes à tes chemins et tu gardes le fichier en l'état ou sinon modifier cette procédure comme ci dessous :
Sub creation_fichiers()
Dim lo As ListObject
Dim rng_temp As Range
Dim count1 As Long, count2 As Long
Dim arr_val(2)
Dim varr_temp As Variant
Set lo = ActiveSheet.ListObjects("IMPORT_ONGLET")
With lo
.Range.AutoFilter Field:=3, Criteria1:=Range("AO2")
count1 = .DataBodyRange.SpecialCells(xlCellTypeVisible).Rows.Count
.Range.AutoFilter Field:=5, Criteria1:="OK"
count2 = .DataBodyRange.SpecialCells(xlCellTypeVisible).Rows.Count
If count1 = count2 Then
For Each rng_temp In .DataBodyRange.SpecialCells(xlCellTypeVisible).Rows
arr_val(0) = .DataBodyRange(rng_temp.Row, 1).Value
arr_val(1) = .DataBodyRange(rng_temp.Row, 2).Value
arr_val(2) = IIf(Right(.DataBodyRange(rng_temp.Row, 4).Value, 1) <> "\", _
.DataBodyRange(rng_temp.Row, 4).Value & "\", _
.DataBodyRange(rng_temp.Row, 4).Value)
Sheets(arr_val(0)).Copy
ActiveWorkbook.Sheets(1).Cells.Copy
ActiveWorkbook.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
For Each varr_temp In ActiveWorkbook.Names
varr_temp.Delete
Next
ActiveWorkbook.SaveAs arr_val(2) & arr_val(1) & "_" & arr_val(0) & ".xlsx"
SupprimerLiaisons (ActiveWorkbook)
ActiveWorkbook.Close
Next rng_temp
End If
End With
Set lo = Nothing
End Sub