MindManagement
New Member
- Joined
- Jan 13, 2016
- Messages
- 8
I found some code on the internet that saves your active sheet as a PDF in a specific directory. I compared the code I found on the internet figuratively speaking a thousand times but I can't see the error. Since I 'm new in the world of programmign macro's (I normally do record Macro), can anyone tell me where the code is wrong.
The error message I get is "run-time error '100' Application-defined or object-defined error". Below is the code as I can see it in my editor.
Sub SaveAsPDF()
'
' SaveAsPDF Macro
'
'
ActiveSheet.ExportAsFixedFormat _
Type:=x1TypePDF, _
Filename:="G:\E-INVOICE" & ActiveSheet.Name, _
Quality:=x1QualityStandard, _
IncludeDocProperties:=False, _
IngnorePrintAreas:=False, _
OpenAfterPublish:=False
End Sub
The error message I get is "run-time error '100' Application-defined or object-defined error". Below is the code as I can see it in my editor.
Sub SaveAsPDF()
'
' SaveAsPDF Macro
'
'
ActiveSheet.ExportAsFixedFormat _
Type:=x1TypePDF, _
Filename:="G:\E-INVOICE" & ActiveSheet.Name, _
Quality:=x1QualityStandard, _
IncludeDocProperties:=False, _
IngnorePrintAreas:=False, _
OpenAfterPublish:=False
End Sub