Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Chart doesn't print w/worksheet but will print by itself | Charts and Charting in Excel | |||
Chart doesn't print w/worksheet properly but will print by itself | Excel Discussion (Misc queries) | |||
Print a chart with worksheet data in excel 2007 | Excel Discussion (Misc queries) | |||
How can I print a chart worksheet on legal size paper? | Charts and Charting in Excel | |||
Chart does not show up in print preview and wont print? | Charts and Charting in Excel |