Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Page numbering (2003)

    I would like to start page number 1 on page 2 without any page numbering on page 1. I found the
    &P+2 ( with a space after the 2) to start page numbering at page 3. You put this in the footer under page setup.
    I tried &P-1(with a space after 1) but page 1 starts with a 0. I would like page 1 not to have any page number. Is there a way to do this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Page numbering (2003)

    Excel is not as flexible as Word in this respect. I don't think it'll be easy to suppress the page number on one page. Perhaps you could store that on another sheet without a page number.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Page numbering (2003)

    In addition to Hans' comment, another way may be to extend the borders of the page to print to overlap the header region. Then you can add a white rectangle on the first page and place it over the page number in the header (of course you will need to keep blank rows at the top of all the sheets)

    Steve

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbering (2003)

    I found the following macro but for some reason it doesn't work. It seems like it would:
    Sub Test()
    Dim TotPages As Long
    TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
    With ActiveSheet.PageSetup
    .CenterFooter = ""
    ActiveSheet.PrintOut From:=1, To:=1
    .CenterFooter = "&8Page &P & of &N"
    ActiveSheet.PrintOut From:=2, To:=TotPages
    End With
    End Sub

    I want the first page to print nothing and all subsequent pages .CenterFooter = "&8Page &P & of &N"

    When I run the macro with this code, the first page is showing Page 1 of 2 instead of nothing.

    Sorry, it does work. It just doesn't show in print preview. The macro sends the report straight to print - duh!

    Now another question - is there anyway to adjust the code to print 1 on page 2 and so on.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbering (2003)

    I used the following code to start to print Page 1 on page 2 and no page number on page 1.

    Sub Test()
    Dim TotPages As Long
    TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
    With ActiveSheet.PageSetup
    .CenterFooter = ""
    ActiveSheet.PrintOut From:=1, To:=1
    .CenterFooter = "&8Page &P-1 "
    ActiveSheet.PrintOut From:=2, To:=TotPages
    End With
    End Sub

    I thought others would like to know if they ever had to do this.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Page numbering (2003)

    You could use this line:

    .CenterFooter = "&8Page &P-1 & of " & (TotPages - 1)

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbering (2003)

    As a side remark: Excel 2007 will be able to do things like that.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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