Bonjour,
j'utilise un code VB sur excel pour enregistrement sous format PDF
un messsage d'erreur s'affiche
Private Sub commandbutton1_click()
Dim nom, chemin As String
CommandButton1.Caption = "TEXT" & [G14] & [A9] & [U4] '
Sheets("Feuil1").Select
Sheets("Feuil1").Copy
nom = CommandButton1.Caption
chemin = "C:\Users\" & Application.UserName & "\Desktop\"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=chemin & nom & ".pdf"
ActiveWindow.Close
End Sub
le beug est dns se ligne de code (ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=chemin & nom & ".pdf")
merci
Partager