+ Reply to Thread
Results 1 to 6 of 6

First Page Number VBA

  1. #1
    Registered User
    Join Date
    11-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    7

    First Page Number VBA

    Is there a VBA that will grab the value in cell A2 and make that the first page number? I need this for about 10 different sheets in a workbook.

    Thanks!

    Zach

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: First Page Number VBA

    Not clear what you're after, but this will name the activesheet the Range("A2") VALUE

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: First Page Number VBA

    Sorry, that was vague. I have page numbers in the footer. I would like the first number to be a VBA code based on the value of the sheet in cell A2.

    Hope that clears it up.

    Thanks!

    Zach

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: First Page Number VBA

    Maybe?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: First Page Number VBA

    The problem is that will make all the page numbers the same value. For example, I put in 2 and all three pages have 2. They should be 2, 3, 4.

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: First Page Number VBA

    Are you talking about multiple pages within a sheet? or multiple sheets?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  7. #7
    Registered User
    Join Date
    11-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: First Page Number VBA

    Both. I have 10 or so sheets, each contain between one to 10 pages. The number of pages will be dynamic, depending on when I run the model. I have VBA that will total the breaks, thus if sheet 2 has 4 pages then I would like sheet 5 to start at page 6.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy auto insert page number and paste to a textbox on same page
    By thadacto in forum Word Formatting & General
    Replies: 3
    Last Post: 03-26-2013, 07:37 AM
  2. Replies: 1
    Last Post: 01-28-2013, 02:14 AM
  3. Hiding the page number in page break preview background.
    By I need coffee, wake me up! in forum Excel General
    Replies: 3
    Last Post: 08-01-2012, 03:00 PM
  4. Replies: 0
    Last Post: 11-08-2007, 09:58 AM
  5. Format page number in excel footer to start at a specific page #
    By straitctrydncr in forum Excel General
    Replies: 3
    Last Post: 04-11-2006, 08:00 AM

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