I still can't figure this one out.
In the attached file, I have a macro that loops through my data and creates a report by unique vendor #. I need to have the macro export each report and save it as a .pdf in my C drive. Anybody know how to do this?
Tower_Scorecard3.xlsm
This is the macro that someone helped build.
Option Explicit
Option Base 1
Sub LoopList()
Dim rVendor() As String
Dim LR As Long, i As Long, j As Long
With Worksheets("Unique")
LR = .Cells(Rows.Count, 1).End(xlUp).Row
ReDim rVendor(1 To LR)
For i = 2 To LR
rVendor(i - 1) = .Cells(i, 1)
Debug.Print rVendor(i - 1)
Next i
End With
With Worksheets("Scorecard")
For j = 1 To UBound(rVendor)
DoEvents
.Range("B7") = rVendor(j)
'Insert Priting PDF statement here
Next j
End With
End Sub
Cross-reference; http://www.excelforum.com/excel-programming/836239-exporting-reports-as-pdf.html?p=2814864
In the attached file, I have a macro that loops through my data and creates a report by unique vendor #. I need to have the macro export each report and save it as a .pdf in my C drive. Anybody know how to do this?
Tower_Scorecard3.xlsm
This is the macro that someone helped build.
Option Explicit
Option Base 1
Sub LoopList()
Dim rVendor() As String
Dim LR As Long, i As Long, j As Long
With Worksheets("Unique")
LR = .Cells(Rows.Count, 1).End(xlUp).Row
ReDim rVendor(1 To LR)
For i = 2 To LR
rVendor(i - 1) = .Cells(i, 1)
Debug.Print rVendor(i - 1)
Next i
End With
With Worksheets("Scorecard")
For j = 1 To UBound(rVendor)
DoEvents
.Range("B7") = rVendor(j)
'Insert Priting PDF statement here
Next j
End With
End Sub
Cross-reference; http://www.excelforum.com/excel-programming/836239-exporting-reports-as-pdf.html?p=2814864