Printing Charts Macro Help

J

joecrabtree

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
 
D

Dave Peterson

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?????????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top