A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Headers and Footer on the Chart do not work??????



 
 
Thread Tools Display Modes
  #1  
Old March 19th, 2006, 08:01 PM posted to microsoft.public.excel.charting
external usenet poster
 
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  
Old March 20th, 2006, 05:01 PM posted to microsoft.public.excel.charting
external usenet poster
 
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Headers and Footer to an Entire Workbook?? Spyder General Discussion 5 February 25th, 2010 03:46 PM
Multiple Headers with the same footer Word problems Page Layout 5 December 29th, 2005 03:58 AM
Stop page headers printing on report footer John Baker Setting Up & Running Reports 2 October 20th, 2005 04:50 PM
Headers and Footer in Word 2000 Kara General Discussion 4 February 2nd, 2005 06:19 AM
Headers and Footers Specter7 New Users 2 May 17th, 2004 03:51 PM


All times are GMT +1. The time now is 08:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.