Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub DoSomethingCool()
- Dim vRws As Long, vRng As Range
- Dim b As Range, b2 As Range, Wst As Worksheet
- Set Wst = Worksheets("RCV1")
- Set WstRef = Worksheets("UniqueNames")
- Set b2 = Wst.Range("b2")
- With WstRef
- vRws = .Cells(Rows.Count, "A").End(xlUp).Row
- Set vRng = Range(.Cells(1, "A"), .Cells(vRws, "A"))
- Wst.PageSetup.PrintArea = "$A$1:$d$15"
- End With
- For Each b In vRng.Cells
- b2 = b
- Wst.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
- "C:\Users\aforshee\Desktop\ReportCards" & b2.Offset(0, 1) & ".pdf", Quality:=xlQualityStandard,
- IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
- False
- Next b
- MsgBox "Finished"
- End Sub
Add Comment
Please, Sign In to add comment