SunnyFlower123
New Member
- Joined
- Jul 31, 2017
- Messages
- 4
I have a workbook that has 80 or so sheets that all roll into a summary statement via vlookups/sumifs/and other formulas.
Currently have around 20 divisions that need to have statements PDF'd which I currently do one-by-one.
the drop down list is in sheet name ("Cheat Sheet") range (H2:H26)
drop down cell is in Sheet name ("Summary") R2
Print area is in Sheet name ("Summary") range B1: O55
Would like to have ONE PDF from print area of each division in the drop-down list and save the file to a designated location with a name "Summary"& cell (O4) from Sheet name ("Summary") . plus, I also need a page number that in the same order as the drop down list.
Appreciate any help.
now, i have a code that works to print pdfs for each divison, but i need a combined one with page number.
Currently have around 20 divisions that need to have statements PDF'd which I currently do one-by-one.
the drop down list is in sheet name ("Cheat Sheet") range (H2:H26)
drop down cell is in Sheet name ("Summary") R2
Print area is in Sheet name ("Summary") range B1: O55
Would like to have ONE PDF from print area of each division in the drop-down list and save the file to a designated location with a name "Summary"& cell (O4) from Sheet name ("Summary") . plus, I also need a page number that in the same order as the drop down list.
Appreciate any help.
now, i have a code that works to print pdfs for each divison, but i need a combined one with page number.
Code:
[/COLOR]Sub Print_All_Divison2_works() Dim rngLoopRange As Range
Dim wsSummary As Worksheet
Dim rngDealers As Worksheet
Set wsSummary = Sheets("summary")
For Each rngLoopRange In Worksheets("Cheat Sheet").Range("H2:H26")
wsSummary.Range("R2").Value = rngLoopRange.Value
wsSummary.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:="C:\Divison PDF\" & rngLoopRange.Value & ".pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Next rngLoopRange
Set wsSummary = Nothing
End Sub[COLOR=#333333]