Good afternoon
I previously copied this code to get help with printing of multiple charts. The code works great however I would like to change it to just print off the first sheet which has the print macro button located on it. This print macro should now just run this code on the page with the charts.
I would appreciate any help.
Dim ws As Worksheet, co As ChartObject
For Each ws In ActiveWorkbook.Worksheets
For Each co In ws.ChartObjects
ActiveSheet.PageSetup.Orientation = xlLandscape
co.Chart.PrintOut
Next co
Next ws
I have tried removing the first for next loop with the ws and tried different derivations of code for the co for next loop and cannot seem to get it right.
Thanks
I previously copied this code to get help with printing of multiple charts. The code works great however I would like to change it to just print off the first sheet which has the print macro button located on it. This print macro should now just run this code on the page with the charts.
I would appreciate any help.
Dim ws As Worksheet, co As ChartObject
For Each ws In ActiveWorkbook.Worksheets
For Each co In ws.ChartObjects
ActiveSheet.PageSetup.Orientation = xlLandscape
co.Chart.PrintOut
Next co
Next ws
I have tried removing the first for next loop with the ws and tried different derivations of code for the co for next loop and cannot seem to get it right.
Thanks