Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sequentially assign a single number to each worksheet

What I need to do is: sequentially assign a single number
to each worksheet. This worksheet number would be along
the same lines as a Page number. Preferably included in
the footer. This number will need to remain static even
if the worksheet should grow beyond a single printed
page. The number will only increase by one when the next
worksheet is printed.

Any thoughts on how I could accomplish this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default sequentially assign a single number to each worksheet

Try something like this:

Dim x as Integer

For x = 1 to ActiveWorkbook.Worksheets.Count
Sheets(x).Select
With ActiveSheet.PageSetup
.LeftFooter = "Sheet " & x & "Page &P of &N"
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Next

Caution: working with PageSetup in code slows things down...

--
sb
" wrote in message
...
What I need to do is: sequentially assign a single number
to each worksheet. This worksheet number would be along
the same lines as a Page number. Preferably included in
the footer. This number will need to remain static even
if the worksheet should grow beyond a single printed
page. The number will only increase by one when the next
worksheet is printed.

Any thoughts on how I could accomplish this?



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
Can Excel sequentially number each new document? Roland Excel Discussion (Misc queries) 1 March 4th 10 04:19 PM
How do I sequentially number indvidual worksheets? Soo Excel Worksheet Functions 2 September 3rd 09 03:26 PM
Can I set a spreadsheet to sequentially number the sheet? CLAYSHELLY Excel Discussion (Misc queries) 3 August 20th 09 05:39 PM
How do I sequentially number every third page of my workbook? TNDeb Excel Worksheet Functions 1 October 25th 05 09:03 PM
How do I number pages of worksheets sequentially? jthecken Excel Discussion (Misc queries) 0 July 13th 05 05:06 PM


All times are GMT +1. The time now is 06:56 PM.

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"