DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Dim basla, bitir As Long
Sub menu()
Sheets("NUMARA").Select
basla = [F4]
bitir = [F5]
Call bicim_ayarla
Call sayfa_olustur
Call yazici_ayarla
Call pdf_kaydet
Cells(1, 1).Select
End Sub
Sub pdf_kaydet()
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ThisWorkbook.Path & "\" & "SonucDosyasi", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub
Sub bicim_ayarla()
Sheets("Sablon").Select
Rows("1:1").RowHeight = 15
Rows("2:2").RowHeight = 26.25
Rows("3:1000000").Select
Selection.RowHeight = 15
Columns("A:L").Select
Selection.ColumnWidth = 8.43
Range("H5").Select
Columns("K:K").Select
Range("K2").Activate
Selection.ClearContents
Range("K2").Select
End Sub
Sub sayfa_olustur()
Sheets("Sablon").Select
say = 2
For i = basla To bitir
Cells(say, "K").Value = i
Cells(say, "K").Select
With Selection.Font
.Name = "Calibri"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Rows(say & ":" & say).RowHeight = 26.25
say = say + 57
Next i
End Sub
Sub yazici_ayarla()
Sheets("Sablon").Select
Application.CutCopyMode = False
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = ""
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(0)
.BottomMargin = Application.InchesToPoints(0)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.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
End Sub
Sub farklı_kaydetme_pdf()
Application.ScreenUpdating = False
say = ActiveSheet.HPageBreaks.Count + 1
bitis = Worksheets("NUMARA").Range("T5").Value * 50
[COLOR="Red"]ActiveSheet.PageSetup.PrintArea = "$A$8:$I$" & bitis ' & Range("b65536").End(3).Row[/COLOR]
dosya_adı = Cells(3, "T").Value
If dosya_adı = "" Then
MsgBox "Dosya adı yok"
Exit Sub
End If
a = MsgBox(" Kayıt etmek istiyormusunuz.?", vbYesNo + vbInformation, " Uyarı")
If a = vbYes Then
For a = 1 To say
[k6] = a & " / " & say
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ThisWorkbook.Path & "\" & dosya_adı, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Next
MsgBox "işlem tamam!"
End If
If a = vbNo Then
MsgBox "işlemi iptal ettiniz.!"
End If
Application.ScreenUpdating = True
End Sub
Sub farklı_kaydetme_pdf()
say = ActiveSheet.HPageBreaks.Count + 1
bitis = Worksheets("NUMARA").Range("C2").Value * 50
[COLOR="Red"]ActiveSheet.PageSetup.PrintArea = "$A$15:$J$" & bitis[/COLOR] ' & Range("A65536").End(3).Row
dosya_adı = Cells(1, "C").Value
If dosya_adı = "" Then
MsgBox "Dosya adı yok"
Exit Sub
End If
a = MsgBox(" Kayıt etmek istiyormusunuz.?", vbYesNo + vbInformation, " Uyarı")
If a = vbYes Then
For a = 1 To say
[C3] = a & " / " & say
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ThisWorkbook.Path & "\" & dosya_adı, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Next
MsgBox "işlem tamam!"
End If
If a = vbNo Then
MsgBox "işlemi iptal ettiniz.!"
End If
End Sub