macro enregistrer sous le nom d une cellule

MELANIE92

XLDnaute Junior
bonjour, ma macro ne marche pas sur windows 7 exel 2007

Sub Macro2()
'
' Macro2 Macro
'

'
Range("C2:J55").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\fd\Desktop\" & Range("I8") & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Range("C8:D8").Select
End Sub

svp ou est le pb ??????
 

MELANIE92

XLDnaute Junior
Sub Macro2()
'
' Macro2 Macro
'

'
Range("C2:J55").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\fd\Desktop\" & Range("I8") & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
End Sub
 

MELANIE92

XLDnaute Junior
Bonjour,

la formule est pas reconnu par exel : erreur de syntaxe.

il surligne en rouge => ;
 

JCGL

XLDnaute Barbatruc
Bonjour à tous,

Ceci fonctionne chez moi :

VB:
Sub Création_PDF()
    Range("B2:G23").Select
    'ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
     "C:\Users\fd\Desktop\" & Range("B2") & " " & " du " & "" & Format(Range("C3"), "ddmmyy") & ".pdf", Quality:=xlQualityStandard, _
     IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    ThisWorkbook.Path & "\" & Range("B2") & " " & " du " & "" & Format(Range("C3"), "ddmmyy") & ".pdf"
    Range("B3").Select
End Sub

A+ à tous
 

Pièces jointes

  • Facture du 300916.pdf
    286.4 KB · Affichages: 39

Discussions similaires

Réponses
2
Affichages
294