Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default setting up a page numbering format

I want to set up a numbering system for an excel 2003 form. I DON'T want to
use page and page of found under header/footer because I don't want to have
these items in the margins, but within the body of the form itself.

The file is set up with sheet one (main form) followed by a continuation
sheet which can be copied to additional tabs creating many continuation
sheets. Using an IF formula, is there a way to reference the (sheet) cell
and (of) cell on the first sheet (tab) and use it to sequence the rest of the
sheets in the file?

Example:
Sheet 1 is the first sheet of 8 total sheets (tabs) in the file.....
Sheet 1 is sheet 1 of 8, sheet 2 is 2 of 8, sheet 3 is 3 of 8..... etc.

Later versions of excel may have this feature now built in, but not in 2003.
Searching thru HELP in excel is getting me nowhere.

Any enlightenment on this subject would be greatly appreciated.... Lenny

Regards
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default setting up a page numbering format

Hi Lenny

I think the routine below does what you specify. It captures the
"SheetActivate" event for the workbook and renumbers the tabs as you require.
Make sure you paste this into the code for the Workbook, NOT in a standalone
module.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim MySheet As Worksheet, WBSheets As Sheets
Dim i As Integer
Application.ScreenUpdating = False
Set WBSheets = ThisWorkbook.Worksheets
i = 0
For Each MySheet In WBSheets
i = i + 1
MySheet.Name = CStr(i) & " of " & CStr(WBSheets.Count)
Next MySheet
Application.ScreenUpdating = True
End Sub

If this helps, please click "Yes"
<<<<<<<<<<<

"Lenny" wrote:

I want to set up a numbering system for an excel 2003 form. I DON'T want to
use page and page of found under header/footer because I don't want to have
these items in the margins, but within the body of the form itself.

The file is set up with sheet one (main form) followed by a continuation
sheet which can be copied to additional tabs creating many continuation
sheets. Using an IF formula, is there a way to reference the (sheet) cell
and (of) cell on the first sheet (tab) and use it to sequence the rest of the
sheets in the file?

Example:
Sheet 1 is the first sheet of 8 total sheets (tabs) in the file.....
Sheet 1 is sheet 1 of 8, sheet 2 is 2 of 8, sheet 3 is 3 of 8..... etc.

Later versions of excel may have this feature now built in, but not in 2003.
Searching thru HELP in excel is getting me nowhere.

Any enlightenment on this subject would be greatly appreciated.... Lenny

Regards

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
start page numbering from page 2 in excel swa Excel Discussion (Misc queries) 2 July 25th 07 04:53 PM
How to return the default setting of numbering format in Excel? saturn Excel Discussion (Misc queries) 1 July 7th 06 07:40 AM
Format page numbering to be Page 1 of X Joan at UCSF Excel Discussion (Misc queries) 2 April 6th 06 03:31 AM
Setting a Prinout format for Printout of a page. forunner101-3 Excel Programming 0 July 28th 05 09:58 PM
Setting sheet names as headers with page numbering KimberlyC Excel Programming 3 May 12th 05 03:48 PM


All times are GMT +1. The time now is 09:36 PM.

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

About Us

"It's about Microsoft Excel"