Enregistrer sous PDF

Bonjour et bonne semaine à toutes et à tous

pas certain cela doit ressembler à ceci à remodeler, il doit y avoir un msgbox de trop je pense

Option Explicit
Sub enregistrer()
Dim nompdf As String

On Error GoTo erreur

    nompdf = "Y:\ASSISTANT QUALITE\Calcul des Indicateurs\" & Range("B12").Value & "_" & Range("B13").Value & "_" & Format([B14], "mmmm_yyyy")
    ThisWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:=nompdf & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True

On Error GoTo existant

    If FichierExiste(nompdf) = True Then
        MsgBox "Le fichier existe."  & vbLf & "nompdf"
    Else
        MsgBox "Le fichier n'existe pas..." 
    End If
existant:
   MsgBox "Fichier existant: " & vbLf & "nompdf"

Exit Sub

erreur:

    MsgBox "Erreur : " & Err.Number & vbLf & Err.Description
Exit Sub
End Sub

crdlt,

André

J'ai joins le fichier avec lequel je voudrais travailler. J'ai indiqué dans la macro ce que je voudrais exactement. je pense avoir ete assez clair cette fois.

Merci mille fois pour votre aide.

Rechercher des sujets similaires à "enregistrer pdf"