View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Page Numbers/Names listed on a Summary sheet?

Give this macro a try (it assumes your summary sheet is named Summary and
that the page numbers will go in Column A and the worksheet names in Column
B starting in Row 2)...

Sub PagesOnSheets()
Dim WS As Worksheet
Dim RowPosition As Long
On Error GoTo Whoops
Application.EnableEvents = False
Application.ScreenUpdating = False
RowPosition = 0
For Each WS In Worksheets
WS.Activate
If WS.Name < "Summary" Then
Worksheets("Summary").Range("A2").Offset(RowPositi on).Value = _
ExecuteExcel4Macro("GET.DOCUMENT(50)")
Worksheets("Summary").Range("B2").Offset(RowPositi on).Value = WS.Name
RowPosition = RowPosition + 1
End If
Next
Worksheets("Summary").Activate
Whoops:
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub

--
Rick (MVP - Excel)


"Derrick" wrote in message
...
Hello!
Im curious to find out if it's possible to insert the page numbers & sheet
names of other sheets into a table which summarizes all the sheets.
for example:
summary sheet:
page # Sheet Name ...Other Calculated numbers...
1 sheet1 ###
2-3 sheet2 ###
4 sheet3 ###
5-10 sheet4 ###

whe sheet1 will print out on 1 page, sheet2 on 2 pages, etc. -
depending
on page breaks

hopefully this won't include me manually inserting any numbers or names.

Any help?
Thanks,