Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to create a "Field-like" Header?
Hi, Is it possible to set up a Header in which I can have something like a
"Field" that get's its data from some part of the worksheet, maybe with some sort of Lookup or something? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to create a "Field-like" Header?
You could use a macro to retrieve a value right before you print/print preview.
This goes behind the ThisWorkbook module: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Worksheets("sheet1").PageSetup .LeftHeader = "a little stuff" .CenterHeader = "what you want here" .RightHeader = .range("a99").text End With End Sub You can read more about events at: Chip Pearson's site: http://www.cpearson.com/excel/events.htm David McRitchie's site: http://www.mvps.org/dmcritchie/excel/event.htm If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ed wrote: Hi, Is it possible to set up a Header in which I can have something like a "Field" that get's its data from some part of the worksheet, maybe with some sort of Lookup or something? -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to create a "Field-like" Header?
Thank you very much!
"Dave Peterson" wrote: You could use a macro to retrieve a value right before you print/print preview. This goes behind the ThisWorkbook module: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Worksheets("sheet1").PageSetup .LeftHeader = "a little stuff" .CenterHeader = "what you want here" .RightHeader = .range("a99").text End With End Sub You can read more about events at: Chip Pearson's site: http://www.cpearson.com/excel/events.htm David McRitchie's site: http://www.mvps.org/dmcritchie/excel/event.htm If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ed wrote: Hi, Is it possible to set up a Header in which I can have something like a "Field" that get's its data from some part of the worksheet, maybe with some sort of Lookup or something? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Want link my header to a cell value | Excel Discussion (Misc queries) | |||
Header Rows and Sort Issue | Excel Discussion (Misc queries) | |||
Title Block as a header? | Excel Discussion (Misc queries) | |||
how do I permanetly add custom header to excel header list? | Excel Discussion (Misc queries) | |||
Default header in Excel under page set-up | Excel Discussion (Misc queries) |