Ilino
XLDnaute Barbatruc
Bonjour Forum
j'ai trouvé ce code et le l'ai adapté selon mon besoin mais malheureusement ca fonctionne pas, j'ai un message d'erreur
"Erreur d'execution '-2147024773'
Document non enregistré"
le code :
j'ai trouvé ce code et le l'ai adapté selon mon besoin mais malheureusement ca fonctionne pas, j'ai un message d'erreur
"Erreur d'execution '-2147024773'
Document non enregistré"
le code :
Code:
Sub ENREGISTRER()
'Macro par Dan
Dim extension As String
Dim chemin As String, nomfichier As String, monfichier_pdf
Dim style As Integer
Application.ScreenUpdating = False
ThisWorkbook.ActiveSheet.Copy
extension = ".xls"
chemin = "C:\Documents and Settings\Admin\Mes documents\Ma musique\"
nomfichier = ActiveSheet.Range("A6") & extension
nomfichier_pdf = ActiveSheet.Range("A6").Text
With ActiveWorkbook
.ActiveSheet.DrawingObjects(1).Delete
[COLOR="#FFFF00"].ExportAsFixedFormat xlTypePDF, chemin & nomfichier_pdf[/COLOR]
.SaveAs Filename:=chemin & nomfichier
'.Close
End With
End Sub