Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Norm
 
Posts: n/a
Default How do I set up a Custom Header that references a specific cell

When printing in excel, I need to create a custom header that will reference
a specific cell on a specific sheet. In this case it would contain a date
(different from today's date) to be printed on the spreadsheet. specifically
" production ending "wk1:a1""

so that it would then print: production ending 6/5/06

thanks


Norm
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default How do I set up a Custom Header that references a specific cell

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = "production ending " & _
Format(Worksheets("wk1").Range("A1").Value, "m/d/yy")
End With
End Sub

This is workbook event code.
To input this code, right click on the Excel icon on the worksheet
(or next to the File menu if you maximise your workbooks),
select View Code from the menu, and paste the code

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Norm" wrote in message
...
When printing in excel, I need to create a custom header that will

reference
a specific cell on a specific sheet. In this case it would contain a date
(different from today's date) to be printed on the spreadsheet.

specifically
" production ending "wk1:a1""

so that it would then print: production ending 6/5/06

thanks


Norm



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
Cell content in custom header: How? Brian __ Lowe Excel Discussion (Misc queries) 5 December 28th 07 10:11 PM
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
Automatically Changing Cell Reference's when Pasting in Excel No I'm Spartacus Excel Discussion (Misc queries) 0 February 13th 06 01:01 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Highlight a row if a specific cell is specific numbers/words sea0221 Excel Worksheet Functions 2 March 9th 05 12:06 AM


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