Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hi folks Can I customise the header so the left section = the content of a cell in the sheet eg A1. All I seem to be able to do is add date, page etc etc.. thanks john Images of home (NZ) http://www.titahi-bay.co.nz/home What we are up to in the UK http://www.titahi-bay.co.nz |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You need some VBA code to do this:
You can use the workbook_beforeprint event to modify the header. Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Me.Worksheets("sheet1") .PageSetup.LeftHeader = .Range("a1").Text End With End Sub This goes behind the ThisWorkbook module. If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm John in Surrey wrote: Hi folks Can I customise the header so the left section = the content of a cell in the sheet eg A1. All I seem to be able to do is add date, page etc etc.. thanks john Images of home (NZ) http://www.titahi-bay.co.nz/home What we are up to in the UK http://www.titahi-bay.co.nz -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell content in custom header: How? | Excel Discussion (Misc queries) | |||
display a drop-down list based on the content of another cell | Excel Discussion (Misc queries) | |||
Using RichTextBox to edit Cell content | Excel Discussion (Misc queries) | |||
View and Cell Sum Range | Excel Discussion (Misc queries) | |||
Transferring cell content between workbooks using cell references | Excel Discussion (Misc queries) |