Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Print Chart Worksheet

I have a list of chart worksheets in F5 down, thanks to peps here for code.

I want to print each chart if there is an Y in the cell next to chart tab
name.
F G
F5 Chart1 Y print
F6 Chart 2 don't print
F7 Chart 3 Y print
etc

Something like if G = Y print chart named in F, repeat to end of F

Thanks for help Blue


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default Print Chart Worksheet

Blue -

Untested but should do the trick.

Sub PrintChartSheets()
Dim rChtName as Range

' first cell with chart name
Set rChtName = ActiveSheet.Range("F5")

Do Until Len(rChtName.Value) = 0
' check whether to print
If rChtName.Offset(0, 1).Value = "Y" then
' skip if chart sheet doesn't exist
On Error Resume Next
ActiveWorkbook.Charts(rChtName.Value).PrintOut
On Error Goto 0
End If

' advance cell
Set rChtName = rChtName.Offset(1)
Loop

End Sub


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


Blue wrote:

I have a list of chart worksheets in F5 down, thanks to peps here for code.

I want to print each chart if there is an Y in the cell next to chart tab
name.
F G
F5 Chart1 Y print
F6 Chart 2 don't print
F7 Chart 3 Y print
etc

Something like if G = Y print chart named in F, repeat to end of F

Thanks for help Blue


Reply
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
Chart doesn't print w/worksheet but will print by itself Vera Charts and Charting in Excel 2 November 7th 08 06:19 PM
Chart doesn't print w/worksheet properly but will print by itself Vera Excel Discussion (Misc queries) 2 November 7th 08 05:49 PM
Print a chart with worksheet data in excel 2007 DAVEYB Excel Discussion (Misc queries) 1 September 2nd 08 04:50 PM
How can I print a chart worksheet on legal size paper? David Vestal Charts and Charting in Excel 0 August 14th 08 04:31 PM
Chart does not show up in print preview and wont print? Capptyone Charts and Charting in Excel 0 May 21st 07 11:03 PM


All times are GMT +1. The time now is 08:29 PM.

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

About Us

"It's about Microsoft Excel"