jl2509
Board Regular
- Joined
- Oct 30, 2015
- Messages
- 198
- Office Version
- 365
- Platform
- Windows
Hi All,
Can anyone help with my issue below please
I have multiple charts on a worksheet (Dashboard) and have several command buttons which will print selected Charts.
I can print individual Charts to PDf, Print Multiple Charts to Individual PDFs but cannot fathom how to print multiple Charts to a Single PDF!
I have started using the "rough" code below, which prints all my selected charts to individual PDFs with individual names, but I want to have a single PDF which will save the filename as a cell reference (i.e A1="Future predictions 2018") but give the option to change the save as location.
Once I have this, I can then try to elaborate the code to include, page setup options such as "Landscape, Margins etc"
Thank you
Can anyone help with my issue below please
I have multiple charts on a worksheet (Dashboard) and have several command buttons which will print selected Charts.
I can print individual Charts to PDf, Print Multiple Charts to Individual PDFs but cannot fathom how to print multiple Charts to a Single PDF!
I have started using the "rough" code below, which prints all my selected charts to individual PDFs with individual names, but I want to have a single PDF which will save the filename as a cell reference (i.e A1="Future predictions 2018") but give the option to change the save as location.
Once I have this, I can then try to elaborate the code to include, page setup options such as "Landscape, Margins etc"
Thank you
Code:
Sub PrintChartArray()
ActiveSheet.Shapes.Range(Array("Chart 8", "Chart 9", "Chart 10", "Chart 24", "Chart 25", "Chart 29")).Select
Dim saveLocation As String
Dim x As Integer
ChartList = ActiveSheet.ChartObjects.Count
For x = 1 To 6
ActiveSheet.ChartObjects(x).Select
ActiveSheet.ChartObjects(x).Activate
saveLocation = Application.GetSaveAsFilename(fileFilter:="PDF Files (*.pdf), *.pdf")
If saveLocation <> "False" Then
ActiveSheet.ExportAsFixedFormat xlTypePDF, saveLocation, xlQualityStandard
End If
Next
End Sub