ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing Charts Macro Help (https://www.excelbanter.com/excel-programming/379343-printing-charts-macro-help.html)

joecrabtree

Printing Charts Macro Help
 
To all,

I have a workbook with a series of charts, each on their own worksheet.
Is there any way to easily just print all of the charts with the click
of a button using a Macro?

Thanks in advance,

Joseph Crabtree


Dave Peterson

Printing Charts Macro Help
 
Do you mean that the charts are on worksheets or on Chart sheets?

I'm guessing ChartSheets:

Option Explicit
Sub testme()
Dim ChSht As Object
For Each ChSht In ActiveWorkbook.Sheets
If TypeName(ChSht) = "Chart" Then
ChSht.PrintOut preview:=True
End If
Next ChSht
End Sub

If you really meant worksheets, you could use this:

Option Explicit
Sub testme2()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
If wks.ChartObjects.Count 0 Then
wks.PrintOut preview:=True
End If
Next wks
End Sub

Or a combination of both?????????




joecrabtree wrote:

To all,

I have a workbook with a series of charts, each on their own worksheet.
Is there any way to easily just print all of the charts with the click
of a button using a Macro?

Thanks in advance,

Joseph Crabtree


--

Dave Peterson


All times are GMT +1. The time now is 11:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com