mein Programmcode läuft leider nicht.
Es wird auch keine Fehlermeldung angezeigt,es passiert garnichts.
Anbei mal der Code
Sub Schaltfläche6_Klick()
' Drucken und erstellen des Dokuments
Dim strPath As String
Dim strName As String
Sheets("Kennzahl").Select
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = "$A$1:$I$68"
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = "&26Stand &D"
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = _
"Erstellt: &D, Mirko Klötzner, Verpackungsplanung, Leipzig (710)"
.CenterFooter = ""
.RightFooter = "Seite: &P von &N" & Chr(10) & "(c) Schenker Deutschland AG"
.LeftMargin = Application.InchesToPoints(0.708661417322835)
.RightMargin = Application.InchesToPoints(0.708661417322835)
.TopMargin = Application.InchesToPoints(0.78740157480315)
.BottomMargin = Application.InchesToPoints(0.78740157480315)
.HeaderMargin = Application.InchesToPoints(0.31496062992126)
.FooterMargin = Application.InchesToPoints(0.31496062992126)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = Array(600, 598)
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperA3
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = True
.EvenPage.LeftHeader.Text = ""
.EvenPage.CenterHeader.Text = ""
.EvenPage.RightHeader.Text = ""
.EvenPage.LeftFooter.Text = ""
.EvenPage.CenterFooter.Text = ""
.EvenPage.RightFooter.Text = ""
.FirstPage.LeftHeader.Text = ""
.FirstPage.CenterHeader.Text = ""
.FirstPage.RightHeader.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
Application.PrintCommunication = True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
strPath = "L:\Verpackungsplanung\290 Auswertungen\290_03_SNR ohne PV" & _
"\290_03_01_SN_ohne_PV_PDF\"
With ThisWorkbook
.Sheets("Kennzahl").Copy
strName = .Sheets("Kennzahl").Range("M5").Value
End With
With ActiveWorkbook
.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=strPath & strName & ".pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
.Close
End With
End Sub
Vielen Dank im Voraus.
lg