Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Brian __ Lowe
 
Posts: n/a
Default Cell content in custom header: How?

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Cell content in custom header: How?

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?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Brian __ Lowe
 
Posts: n/a
Default Cell content in custom header: How?

That does it - Thanks for the prompt response.

I'm sure back in 95/97 there was some way to insert a reference to a cell in
the dialog. I don't remember dropping in to VBA to do it, but then it was a
long time ago.

Cheers


"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?




  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Cell content in custom header: How?

Not saying there wasn't, but I am not aware of it.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Brian __ Lowe" wrote in message
...
That does it - Thanks for the prompt response.

I'm sure back in 95/97 there was some way to insert a reference to a cell

in
the dialog. I don't remember dropping in to VBA to do it, but then it was

a
long time ago.

Cheers


"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?






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default 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?






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Cell content in custom header: How?

I would like to do something similar, but I'd like the header to
change with each page. For example:

List of Payments by Branch and Officer
Branch Name: (name of branch for first row on page)
Officer Name (name of officer for first row on page)

I have the report page break on each change in officer. The branch
name and Officer Name data is in the spreadsheet I just have the
columns hidden from view.

Thanks
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
Link page header with cell contents Matthew Excel Worksheet Functions 8 May 1st 07 06:22 PM
Using RichTextBox to edit Cell content dlavoie Excel Discussion (Misc queries) 0 October 13th 05 06:13 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Custom Header Josh O. Excel Discussion (Misc queries) 1 December 1st 04 06:56 PM
Transferring cell content between workbooks using cell references Kiwi Mike Excel Discussion (Misc queries) 2 November 27th 04 11:31 PM


All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"