+ Reply to Thread
Results 1 to 4 of 4

Referencing page setup header information in VBA

  1. #1
    Registered User
    Join Date
    06-11-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Referencing page setup header information in VBA

    I am interested in inserting a formula into a cell which will populate the cell with the CenterHeader value that is already populated within Page Setup. Can someone please offer some insight into how to accomplish this? Thanks.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Referencing page setup header information in VBA

    Welcome to the forum.

    Try recording a macro and then editing it from there.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-11-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Referencing page setup header information in VBA

    Thanks SHG. While recording the macro I opened the page setup screen and clicked okay. This allowed me to view the syntax of the recorded code. That was all I needed in order to come up with the needed syntax: ActiveCell.Value = ActiveSheet.PageSetup.CenterHeader. Thanks again.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Referencing page setup header information in VBA

    Well done, thanks for posting back with results.

+ 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