Posted to microsoft.public.excel.misc
|
|
Cell content in custom header: How?
Hi Bob,
Is there a way to insert a different cell content on to different worksheets
within a workbook?
Example
Sheet 1 : use Cell A1
Sheet 2 : usse Cell F2
Sheet 3 : use Cell M5
Igbert
"Bob Phillips" wrote:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = ActiveSheet.Range("D1").Value
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
RP
(remove nothere from the email address if mailing direct)
"Brian __ Lowe" <Brian __ wrote in message
...
I need to show the content of a specific cell in the custom page header
when
I print my worksheet.
I'm sure it can be done because I did it way back in Excel 95 or 97, but I
can't find the right search term to locate it in the help, and the wizard
guidance only helps me put file/sheet/date/page data values in there.
So, how do I get the content of cell $D$1 to appear as part of the page
header?
|