lord of horses
New Member
- Joined
- Jun 18, 2015
- Messages
- 6
I have two sheets (Sheet1, & Sheet2).
Sheet2 is a template that has multiple vlookups connected to Sheet1.
What I would like to do, is go through every single row (A2, A3, etc) from Sheet1 & paste it into Sheet2 Cell C5, and Save As the text from A2 in Sheet1.
Not having much luck, and was hoping someone could help.
Sub Macro1()
RowCount = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row - 1
Worksheets("Sheet2").Select
For i = 1 To RowCount
Range("C5").Value = i
ChDir "C:\New folder"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\New folder" & Range("C5").pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Next i
End Sub
Thanks in advance!
Sheet2 is a template that has multiple vlookups connected to Sheet1.
What I would like to do, is go through every single row (A2, A3, etc) from Sheet1 & paste it into Sheet2 Cell C5, and Save As the text from A2 in Sheet1.
Not having much luck, and was hoping someone could help.
Sub Macro1()
RowCount = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row - 1
Worksheets("Sheet2").Select
For i = 1 To RowCount
Range("C5").Value = i
ChDir "C:\New folder"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\New folder" & Range("C5").pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Next i
End Sub
Thanks in advance!