+ Reply to Thread
Results 1 to 2 of 2

view cell content in header

  1. #1
    John in Surrey
    Guest

    view cell content in header


    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. #2
    Dave Peterson
    Guest

    Re: view cell content in header

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