+ Reply to Thread
Results 1 to 4 of 4

Cell content in custom header: How?

  1. #1
    Brian __ Lowe
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: 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 __ [email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Brian __ Lowe
    Guest

    Re: 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 __ [email protected]> wrote in message
    > news:[email protected]...
    > > 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. #4
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 __ [email protected]> wrote in

    message
    > > news:[email protected]...
    > > > 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?

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1