Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default variable print area?


The worksheet and charts on the worksheet have
independent PageSetUp properties. The modified code
below adds the chart title text to the chart header.
It does not affect the header for the worksheet.
'-----------------------
Sub PrintAllCharts2()
Dim objChtObjects As Excel.ChartObjects
Dim objCht As Excel.ChartObject

Set objChtObjects = ActiveSheet.ChartObjects
For Each objCht In objChtObjects
With objCht.Chart
.PageSetup.CenterHeader = .ChartTitle.Text
.PrintOut
End With
Next
Set objCht = Nothing
Set objChtObjects = Nothing
End Sub
-----------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"LadyReader"
wrote in message
Jim, that's a great answer. Right now I have:
Code:
--------------------
With ActiveSheet.PageSetup
.CenterHeader = "&26Chart 25"
.PrintTitleRows = ""
.PrintTitleColumns = ""
.CenterHorizontally = True
.CenterVertically = True
End With
--------------------

in my code. I'd like to set .CenterHeader dynamically so that the
printed page header is set to the chart title. Can you tell me how I
can address the chart title within your loop?
And the user may want to randomly select which charts to print so I am
working on a UI to allow the selection. Any ideas?
Thanks to all who responded!
LadyReader

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
Selecting a variable print area in a macro Surrealest Excel Discussion (Misc queries) 2 June 7th 09 07:08 AM
Variable print area via a macro Andrew Excel Discussion (Misc queries) 9 September 16th 08 09:01 AM
Using named range to extend print area for variable number of columns Pierre Excel Worksheet Functions 3 April 10th 08 05:51 PM
Variable print area BOBF Excel Discussion (Misc queries) 2 March 22nd 05 01:47 PM
Setting a variable print area cdb Excel Programming 4 May 20th 04 02:21 PM


All times are GMT +1. The time now is 09:40 AM.

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"