Repertoire fichier courant

Résolu
Backri_050288 Messages postés 2 Statut Membre -  
f894009 Messages postés 17417 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour chers experts. Je voulais sauvegarder ma feuille dans un repertoire courant.
quelqu'un peut m'aider?
Voici mon code

Sub ALC()
'
' ALC Macro
Application.ScreenUpdating = False
Sheets("1._All_Location").Select
Sheets("1._All_Location").Name = "1._All_Location"
ChDir "D:\Statistiques\Statistique_Pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"D:\Statistiques\Statistique_Pdf\1._All_Location_20190330_20190404.pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Range("L8").Select
MsgBox "L'exportation est terminée!Rendez-vous dans D:\Statistiques\Statistique_Pdf", vbOKOnly + vbInformation, "Information"
Application.ScreenUpdating = True
End Sub

3 réponses

  1. f894009 Messages postés 17417 Date d'inscription   Statut Membre Dernière intervention   1 717
     
    Bonjour,

    un repertoire courant.
    Pouvez developper!!!
    0
  2. Backri_050288 Messages postés 2 Statut Membre
     
    Au fait je voudrais que l'exportation puisse etre assurée dans le repertoire ou le dossier est ouvert

    merci
    0
    1. f894009 Messages postés 17417 Date d'inscription   Statut Membre Dernière intervention   1 717
       
      Re,
      De ce que je comprends:
      pour le ficher actif:
      Chemin=ThisWorkbook.Path
      0
  3. Backri_19
     
    Oui mais comment l'integrer dans mon code que j'ai joint là?
    0
    1. f894009 Messages postés 17417 Date d'inscription   Statut Membre Dernière intervention   1 717
       
      Bonjour,
      Je suppose comme ceci, vu que vous meme ne le savez pas!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      Sub ALC()
          ' ALC Macro
          Application.ScreenUpdating = False
          Chemin = ThisWorkbook.Path
          Sheets("1._All_Location").Select            '?????????????????????????
          Sheets("1._All_Location").Name = "1._All_Location"      '??????????????????????????
          'ChDir "D:\Statistiques\Statistique_Pdf"
          ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
              Chemin & "\1._All_Location_20190330_20190404.pdf", _
              Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
              :=False, OpenAfterPublish:=False
          Range("L8").Select
          MsgBox "L'exportation est termin?e!Rendez-vous dans D:\Statistiques\Statistique_Pdf", vbOKOnly + vbInformation, "Information"
          Application.ScreenUpdating = True
      End Sub
      
      
      0