How to print 15 embeded charts on two sheets at once?

D

Dmitry

Hello specialists!
How to print 15 embedded charts (without data cells) on two sheets at once?
Best regards,
Dima
(e-mail address removed)
 
J

Jon Peltier

You don't want data cells. Does that mean you want each chart printed on its
own page? This cannot be done without a macro. Do you instead want just the
portion of the worksheet with the charts to be printed, but not the portion
of the sheet with the data? Select the range containing the charts, and set
the print area (File menu > Print Area > Set Print Area. Repeat for the
other worksheet, then select both (click on one, ctrl+click on the other),
File > Print, choose the Active Sheets option to print both sheets at once.

If you want a whole bunch of charts printed on separate pages, make each
into a chart sheet (Chart menu > Location > As Chart), then use the
ctrl+click trick above to select the ones you want, and print them.

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

Dmitry

Thanks Jon Peltier for your detailed reply!
Yes, I don't want data cells. Yes, I want one or two charts printed on
theirs own page. There is not a portion of the worksheet with the charts to
be printed, the charts are divided, surrounded by their data cells.
What should be the macro code?
Dima
 
J

Jon Peltier

The macro code would look like this:

Dim Wksht As Worksheet
Dim ChtOb As ChartObject
Dim sSheets(1 to 2) As String
Dim iSheet As Long

sSheets(1) = "Sheet 1"
sSheets(2) = "Sheet 2"

For iSheet = 1 to 2
Set Wksht = ThisWorkbook.Worksheets(sSheets(iSheet))
For Each ChtOb In Wksht.ChartObjects
ChtOb.Chart.PrintOut
Next
Next


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

Dmitry

Thanks Jon Peltier for the macro code!
Jon Peltier said:
The macro code would look like this:

Dim Wksht As Worksheet
Dim ChtOb As ChartObject
Dim sSheets(1 to 2) As String
Dim iSheet As Long

sSheets(1) = "Sheet 1"
sSheets(2) = "Sheet 2"

For iSheet = 1 to 2
Set Wksht = ThisWorkbook.Worksheets(sSheets(iSheet))
For Each ChtOb In Wksht.ChartObjects
ChtOb.Chart.PrintOut
Next
Next


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top