Judi
Use Ron's second macro "Testme2" which selects just the charts on the sheets.
Place it into a general module in your workbook by copying it from the post then
with your workbook open hit ALT + F11 to open VBEditor.
CTRL to open Project Explorer.
Select your workbook/project and InsertModule.
Paste into that module.
You have to "enable macros" when you open the workbook.
Make sure your ToolsOptionsSecurityMacro Security is set to "Medium" so you
get the choice to "enable" or "disable" macros.
Gord Dibben MS Excel MVP
On Wed, 24 Jan 2007 14:11:01 -0800, Judi wrote:
Thanks Ron. I've tried using each of these, and also using both. It doesn't
do anything. I tried running the macro (but it wouldn't work actually, it
wouldn't run it - said something about turning macros on).
To be clear, I have a workbook. It has upwards of 40 worksheets. On each
worksheet, I have a chart object that I've got based on some data on each
sheet. When I print, I have to manually go to the next tab, select the chart
object (so it doesn't print all the data as well), and then print. Manually
doing this can be time consuming. Additionally, if I forget to make sure my
chart is selected, my whole worksheet prints out.
Does this explain my chart a bit more?
~Judi
"Ron de Bruin" wrote:
Looka this old Reply From Dave
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?????????
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Judi" wrote in message ...
I have a workbook, within which has tabs with employee names, and a chart on
each tab (almost every tab). Is there a way (macro or other) to, with one
button, print all the charts? Currently I have to manually change tabs,
select the chart, and print.
Thank you!
~Judi