+ Reply to Thread
Results 1 to 2 of 2

insert pagenumber in PageSetup in Excel using VB.net

Hybrid View

Guest insert pagenumber in... 03-20-2006, 10:00 PM
Guest Re: insert pagenumber in... 03-20-2006, 11:00 PM
  1. #1
    ramesh.venkat@target.com
    Guest

    insert pagenumber in PageSetup in Excel using VB.net

    Hi ,

    I'm creating an excel worksheet in VB.NET

    While setting the print properties , I was able to print the date on
    the left footer
    ..PageSetup.LeftFooter = "Printed on " & Today.ToShortDateString

    I want to insert a pagenumber in custom footer for Excel .
    At the right footer , it should print like " Page 1 of 4"
    The macro is &[Page] of &[Pages] in excel.

    I am not able to find the property for page and pages

    If somebody could help me , I'd appreciate it


    Thanks in Advance,

    ramesh


  2. #2
    Tom Ogilvy
    Guest

    Re: insert pagenumber in PageSetup in Excel using VB.net

    .LeftFooter = "Printed on &D" ' Date
    .CenterFooter = ""
    .RightFooter = "page &P of &N" ' page n of m

    Don't be afraid to use the macro recorder.

    --
    Regards,
    Tom Ogilvy


    <ramesh.venkat@target.com> wrote in message
    news:1142906219.577535.154700@u72g2000cwu.googlegroups.com...
    > Hi ,
    >
    > I'm creating an excel worksheet in VB.NET
    >
    > While setting the print properties , I was able to print the date on
    > the left footer
    > .PageSetup.LeftFooter = "Printed on " & Today.ToShortDateString
    >
    > I want to insert a pagenumber in custom footer for Excel .
    > At the right footer , it should print like " Page 1 of 4"
    > The macro is &[Page] of &[Pages] in excel.
    >
    > I am not able to find the property for page and pages
    >
    > If somebody could help me , I'd appreciate it
    >
    >
    > Thanks in Advance,
    >
    > ramesh
    >




+ 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