I have a workbook with four worksheets (Sheet1, Sheet2, Sheet3, Sheet4) that contain nothing more than a basic Excel chart in each sheet. I would like to write a macro that when I click the macro button, I will be prompted to name the file and select a save location. I would like to save each excel chart in Landscape orientation, as well as FitToPagesWide = 1 and FitToPagesTall = 1.
The idea is that the charts will print to independent pages from the .PDF and be large enough I can display them on a board. The paper could print in basic A3, or A4, depending on the country where the printing is going to occur.
Here's what I have... It works to save the four sheets to .PDF pages, however, they are not in landscape orientation and they do not fill the page to the maximum size the chart can stretch without going off the page:
Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4")).Select
Dim saveLocation As String
saveLocation = Application.GetSaveAsFilename( _
fileFilter:="PDF Files (*.pdf), *.pdf")
If saveLocation <> "False" Then
ActiveSheet.ExportAsFixedFormat xlTypePDF, saveLocation, xlQualityStandard
End If
Bookmarks