Results 1 to 5 of 5

Reference Cell in Page Header Using VBA - Excel 2007

Threaded View

  1. #3
    Registered User
    Join Date
    09-22-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Reference Cell in Page Header Using VBA - Excel 2007

    I tried inserting what I have quoted below on the VBA Editor Worksheet: BeforePrint and do not see any changes. Is it something I should see populate the header field in page layout view, or will I have to view via print preview in order to see the name?

    Yes, the plan is to change the name on a regular basis so that custom price pages may be printed for various prospects, so what would I need to do to run the macro and update the header, please?

    Many thanks!!


    Quote Originally Posted by Greg M View Post
    Hi there!

    Try inserting the following code into a standard VBA Code Module and see if it does what you want:


        Dim wks As Worksheet
    
        For Each wks In ThisWorkbook.Worksheets
            wks.PageSetup.LeftHeader = ThisWorkbook.Worksheets("Master").Range("A3").Value
        Next wks
    
    End Sub
    alansidman: I am absolutely embarrassed over here. Thank you for correcting my post. I will pay much more attention next time.
    Last edited by mcapril; 09-22-2013 at 10:20 PM. Reason: Did not edit code to show what I entered

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Add cell reference to Page Setup Header
    By jhovey in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-25-2012, 02:36 PM
  2. Reference cell from top row of each page in header
    By mzemble in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2009, 12:45 AM
  3. Adding a Reference to Header/Footer in excel 2007
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 11-13-2007, 05:33 AM
  4. [SOLVED] Excel: can I refer to cell reference in page setup header
    By nikos in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-21-2006, 02:25 PM
  5. Excel header/footer cell reference
    By Paddy in forum Excel General
    Replies: 2
    Last Post: 12-16-2005, 11:35 AM

Tags for this Thread

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