ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Printing charts from multiple worksheets (https://www.excelbanter.com/excel-discussion-misc-queries/127535-printing-charts-multiple-worksheets.html)

Judi

Printing charts from multiple worksheets
 
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

Ron de Bruin

Printing charts from multiple worksheets
 
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


Judi

Printing charts from multiple worksheets
 
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



Ron de Bruin

Printing charts from multiple worksheets
 
Maybe this is easier for you (no macros)

This example create a link to the chart and will update when the chart update
http://www.rondebruin.nl/print.htm#non-contiguous

Select the range with the chart in it when you do this




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Judi" wrote in message ...
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



Gord Dibben

Printing charts from multiple worksheets
 
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




Judi

Printing charts from multiple worksheets
 
I hate to be a pest, especially since *I'M* likely the one making the mistake
here...but it's not working. Have I explained myself well enough so you
understand my chart??

~Judi

"Ron de Bruin" wrote:

Maybe this is easier for you (no macros)

This example create a link to the chart and will update when the chart update
http://www.rondebruin.nl/print.htm#non-contiguous

Select the range with the chart in it when you do this




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Judi" wrote in message ...
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



Ron de Bruin

Printing charts from multiple worksheets
 
Hi Judi

Send me a example workbook private then I send you a example.

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Judi" wrote in message ...
I hate to be a pest, especially since *I'M* likely the one making the mistake
here...but it's not working. Have I explained myself well enough so you
understand my chart??

~Judi

"Ron de Bruin" wrote:

Maybe this is easier for you (no macros)

This example create a link to the chart and will update when the chart update
http://www.rondebruin.nl/print.htm#non-contiguous

Select the range with the chart in it when you do this




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Judi" wrote in message ...
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




All times are GMT +1. The time now is 07:13 AM.

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