Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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


wrote in message
oups.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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pagenumber etc. hans[_3_] Excel Programming 1 October 19th 04 10:38 PM
Excel generation and PageSetup.CenterHeader lfb Excel Programming 3 February 9th 04 05:24 PM
pagenumber of active cell (vba) Ralf Hörbelt Excel Programming 2 December 24th 03 01:05 PM
pagenumber hans[_2_] Excel Programming 1 November 17th 03 03:00 PM
Insert Date value in PageSetup ?? Vanessa[_2_] Excel Programming 1 September 15th 03 12:55 PM


All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"