Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
maperalia
 
Posts: n/a
Default Headers and Footer on the Chart do not work??????

I have this program that take values from the cell B3 an B4 on th Sheet1 and
put them automatically in all headers and footers in all the worksheets (see
below).
However, when I run the program all the sheets got the header and footer
except the sheets that have chart.
Could you please help me to fix this problem?.

Thanks in advance.

Maperalia




Option Explicit
Sub HeadersAndFooters()
Dim WS As Worksheet
For Each WS In Worksheets

'***********Header***********
WS.PageSetup.RightHeader = "&14&B&I" &
Format(Worksheets("Sheet1").Range("B3").Value)

'***********Footer***********
WS.PageSetup.LeftFooter = "&14&B&I" &
Format(Worksheets("Sheet1").Range("B4").Value)

Next WS
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.charting
Daniel CHEN
 
Posts: n/a
Default Headers and Footer on the Chart do not work??????

Charts sheets is not a worksheet.
So charts are not in the collection of ActiveWorkbook.Worksheets, they are
in the collection of ActiveWorkbook.Charts.
In your program, I think you apply the footer and header to all worksheets,
not include charts.

--
Best regards,
---
Yongjun CHEN
=================================
XLDataSoft - Data Analysis Expert, Excel/VBA Specialist
- - - - www.XLDataSoft.com - - - -
Free Excel-Based Data Processing Tool is Available for Download




=================================
"maperalia" wrote in message
...
I have this program that take values from the cell B3 an B4 on th Sheet1
and
put them automatically in all headers and footers in all the worksheets
(see
below).
However, when I run the program all the sheets got the header and footer
except the sheets that have chart.
Could you please help me to fix this problem?.

Thanks in advance.

Maperalia




Option Explicit
Sub HeadersAndFooters()
Dim WS As Worksheet
For Each WS In Worksheets

'***********Header***********
WS.PageSetup.RightHeader = "&14&B&I" &
Format(Worksheets("Sheet1").Range("B3").Value)

'***********Footer***********
WS.PageSetup.LeftFooter = "&14&B&I" &
Format(Worksheets("Sheet1").Range("B4").Value)

Next WS
End Sub



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
Adding Headers and Footer to an Entire Workbook?? Spyder Excel Discussion (Misc queries) 5 February 25th 10 03:46 PM
Permantly removing header and footer Junkman Excel Discussion (Misc queries) 3 April 3rd 08 02:00 PM
How can I get headers to copy in charts? KC Charts and Charting in Excel 1 March 17th 06 07:33 PM
header and footer problems cliffhanger79 Charts and Charting in Excel 4 November 7th 05 08:03 PM
How do I make the custom headers and footer repeat on every works. Chrisod Excel Worksheet Functions 3 January 24th 05 09:05 AM


All times are GMT +1. The time now is 11:24 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"