Dear experts,
every day I save pdf containing "workbook sheets printing area" without checking, if something relevant is filled in or not in some sheets.
Could you please help me to update code below, what will select only Sheets, where somethnig is filled in specific range of every Sheet – for example “A1”. Value in every sheet?
Thank you.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets(Array("AA", "BB", "CC", "DD", "EE", "FF", "GG", "HH", "II", "JJ", "KK")).Select
Sheets("USA 1").Activate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"D:\HISTORY\" & Range("C57").Value & " " & Range("E57").Value & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
End Sub
Bookmarks