I need help making this macro work with what i have been using
The current macro is
Sheets(Array("Cover Letter", "Well Info", "Pump Schedule", actsht)).Select
Sheets(actsht).Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
End Sub
I need this macro to work below only PDF the sheets selected. It is PDFing the entire workbook and not the selected sheets. I tried changing the active workbook to ActiveWindow.SelectedSheets. and that did not work.
I image it needs to be some thing close to that to prevent printing all tabs within workbook.
End If
Sheets(Array("Cover Letter", "Well Info", "Pump Schedule", actsht)).Select
Sheets(actsht).Activate
Path = Environ$("USERPROFILE") & "\Desktop\"
Filename = Range("Z138").Value
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Path & Filename, Quality:=xlQualityStandard, IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub
Bookmarks