LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 4
Default Print Specific Charts

I have a little problem with some code I've been using. In my workbook I have
7 sheets with 45+ pre-made charts. Some have data but most don't. The current
code I have counts how many charts there are on the sheet, selects,
activates, and prints them all the way I like. Thing is I'd like it to print
only the charts with data in them.

I thought that a code could be made that checks the source range of the
chart for numbers then prints that chart. However because there are 45+
charts and 7 sheets that would take awhile.

Below is an example of the code i'm currently using.

Sub PrintEmbeddedCharts()
Dim ChartList As Integer
Dim X As Integer
' Variable chartlist stores a count of all embedded charts.
ChartList = ActiveSheet.ChartObjects.Count
' Increments the counter variable 'X' in a loop.
For X = 1 To ChartList
' Selects the chart object.
ActiveSheet.ChartObjects(X).Select
' Makes chart active.
ActiveSheet.ChartObjects(X).Activate
' Prints one copy of active chart.
ActiveChart.PrintOut Copies:=1
Next
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Always print to a specific location Tommy-B[_2_] Excel Discussion (Misc queries) 0 June 15th 07 06:29 PM
How To always print to a specific Location Tommy-B[_2_] Excel Discussion (Misc queries) 0 June 15th 07 06:27 PM
Don't print a specific cell Mike Excel Worksheet Functions 5 March 30th 06 07:11 PM
print specific cells Wendy Excel Discussion (Misc queries) 1 February 10th 05 06:52 PM
print a specific area within a worksheet by clicking on print? honclub Excel Worksheet Functions 1 October 29th 04 03:22 AM


All times are GMT +1. The time now is 12:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"