Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Help with Header

I have the following code that puts the date value that I want into the
header of all worksheets.

Sub DateInHeader2()
Dim S As Worksheet
For Each S In ActiveWorkbook.Worksheets
S.PageSetup.LeftHeader = Format(Sheets("SUMMARY").Range("C1").Text, _
"[$-409]mmmm d, yyyy;@")
Next
End Sub

Now I need to be to able format the text to bold. Below is a sample that I
recorded to format the header to bold but I can not figure out how to
incorpate this info into the above code.

..LeftHeader = "&""Arial,Bold""January 1, 2004"

Please help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Help with Header

Hi
not tested but try:
..PageSetup.LeftHeader = "&""Arial,Bold""" & Format(Sheets("SUMMARY").Range
_("C1").Text, "[$-409]mmmm d, yyyy;@")



"Judd Jones" wrote:

I have the following code that puts the date value that I want into the
header of all worksheets.

Sub DateInHeader2()
Dim S As Worksheet
For Each S In ActiveWorkbook.Worksheets
S.PageSetup.LeftHeader = Format(Sheets("SUMMARY").Range("C1").Text, _
"[$-409]mmmm d, yyyy;@")
Next
End Sub

Now I need to be to able format the text to bold. Below is a sample that I
recorded to format the header to bold but I can not figure out how to
incorpate this info into the above code.

.LeftHeader = "&""Arial,Bold""January 1, 2004"

Please help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with Header

Sub DateInHeader2()
Dim S As Worksheet
For Each S In ActiveWorkbook.Worksheets
S.PageSetup.LeftHeader = "&""Arial,Bold""" & _
Format(Sheets("SUMMARY").Range("C1").Text, _
"[$-409]mmmm d, yyyy;@")
Next
End Sub

--
Regards,
Tom Ogilvy

"Judd Jones" wrote in message
...
I have the following code that puts the date value that I want into the
header of all worksheets.

Sub DateInHeader2()
Dim S As Worksheet
For Each S In ActiveWorkbook.Worksheets
S.PageSetup.LeftHeader =

Format(Sheets("SUMMARY").Range("C1").Text, _
"[$-409]mmmm d, yyyy;@")
Next
End Sub

Now I need to be to able format the text to bold. Below is a sample that I
recorded to format the header to bold but I can not figure out how to
incorpate this info into the above code.

.LeftHeader = "&""Arial,Bold""January 1, 2004"

Please help



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
Omit header from first page without embedding header in code ibvalentine Excel Worksheet Functions 6 August 28th 07 05:10 AM
Get Intersection value given column header and row header Scorcel Excel Discussion (Misc queries) 1 June 6th 07 08:24 AM
Excel-Header-My Company Name won't work in Header (AT&T) & Time June K Excel Discussion (Misc queries) 2 April 10th 06 08:36 PM
Excel: custom header - is it possible to paste into header? Maureen D. Excel Worksheet Functions 0 November 4th 05 03:07 PM
how do I permanetly add custom header to excel header list? GARY Excel Discussion (Misc queries) 1 December 15th 04 08:52 PM


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

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"