Voici un code pour exporter toutes les feuilles d'un classeur excel en fichiers CSV. Cette macro demande de choisir le dossier où les fichiers vont être enregistrés. Les fichiers sont nommés d'après le titre de la feuille Excel.
Dim folderPath As String
Sub SaveAllSheetsAsCSV()
    
    'lancer la macro qui demande le nom du dossier
      GetFolder
    
    
        'si après getFolder il n'y a toujours pas de dossier
    'c'est que la personne a cliqué "Annulé"
    'on arrête alors la macro avec Exit Sub, sinon on lance l'export
    If ThisWorkbook.Sheets("Param").Range("A6") = "" Then
      Exit Sub
    Else
        Dim i As Integer
        Dim fName As String
        Application.DisplayAlerts = False
        For i = 1 To Worksheets.Count
        fName = folderPath & Application.PathSeparator & ActiveWorkbook.Sheets(i).Name
        ActiveWorkbook.Worksheets(i).SaveAs Filename:=fName, FileFormat:=xlCSV
        Next i
    
    End If
End Sub
Function GetFolder() As String
'macro trouvée sur internet
'(il s'agit d'une function, et non d'une sub)
'elle ne contient rien de suspect (si vous avez un doute, faites valider)
'elle demande un nom de dossier et l'affecte à la variable folderpath
    Dim fldr As FileDialog
    Dim sItem As String
    Set fldr = Application.FileDialog(msoFileDialogFolderPicker)
    With fldr
        .Title = "Select a Folder"
        .AllowMultiSelect = False
        .InitialFileName = Application.DefaultFilePath
        If .Show <> -1 Then GoTo NextCode
        sItem = .SelectedItems(1)
    End With
        folderPath = sItem
NextCode:
    GetFolder = sItem
    
    Set fldr = Nothing
End Function

