How to print the charts in my sheet through vba

A

amrezzat

heloo
i want to print all charts in my sheet
and i want to se the margins of the sheet to all equal to =2 cm
and no footer no header

how through vba?
by the way i use a sub to print a sheet and specifiy the printarea for
it
and when i use that
ActiveSheet.ChartObjects.PrintOut preview:=True
an error appears
how can i fix that??
 
D

Don Guillett

try this idea instead
Sub printcharts()
Dim Ch As ChartObject
For Each Ch In ActiveSheet.ChartObjects
Ch.Chart.PrintPreview
Next
End Sub
 

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