Print Multiple Charts to a single PDF, but not all Charts

jl2509

Board Regular
Joined
Oct 30, 2015
Messages
198
Office Version
  1. 365
Platform
  1. 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

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
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top