Hi Loki,
I'm think I might have the extra links in the wrong spot. Only the first row of the loop is being generated. Here's the code I have:
Sub PDF()
Dim ws1 As Worksheet, ws2 As Worksheet, ws3 As Worksheet
Dim LastRow As Long
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set ws1 = Sheets("xx")
Set ws2 = Sheets("yy")
Set ws3 = Sheets("zz")
LastRow = Range("B" & ActiveSheet.Rows.Count).End(xlUp).Row
SPath = "C:\”
For iRow = 35 To LastRow
Sheets("Input").Cells(15, 2).Value = Sheets("Input").Cells(iRow, 2).Value
SName = Sheets("Input").Cells(16, 2).Value
Application.Calculation = xlCalculationManual
Application.CalculateBeforeSave = False
On Error Resume Next
ws1.Copy
Cells.Copy
Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
ws2.Copy After:=ActiveWorkbook.Worksheets(ActiveWorkbook.Worksheets.Count)
Cells.Copy
Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
ws3.Copy After:=ActiveWorkbook.Worksheets(ActiveWorkbook.Worksheets.Count)
Cells.Copy
Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:=SPath & SName, Quality:=xlQualityMinimum, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
ActiveWorkbook.Close
Next iRow
Application.Calculation = xlCalculationAutomatic
Application.CalculateBeforeSave = True
On Error GoTo 0
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Can you give me a hand placing the calculation lines in the right spots?
Thanks!
Bookmarks