Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Method to automate page numbers on single worksheet

I have a single worksheet, on this worksheet i have a range that can
be a minimum of 2 full to an infinite number 8/12" X 11" sheets when
printed.

at the top of the worksheet, example cell h5 i want to display the
following:-

Page 1 of X (x being the number of pages in the print range)

The subsequent pages that are printed the page number field will be at
cell H55, H105, H155....... etc.

The worksheet starts out with a single sheet, I call the header page,
all subsequent ranges are added with a macro button and are placed
directly below the last added range, for example, the last cell with
content is A49, then the range to insert will start at A50 etc etc

How can I create a method to have cell H55, H105, H155...... display
the Page 2 of X, Page 3 of X etc etc.

Cheers
burl_h
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 259
Default Method to automate page numbers on single worksheet

Hi Burl

Try this as an example to produce Page of Pages instead of using Cells (
Unless there is another reason you have to point to a cell ).

Sub PrintReport()

Dim myWkS As Worksheet
Set myWkS = ActiveSheet

With myWkS.PageSetup
.RightHeader = "&P" & " of " & "&N"
.FitToPagesWide = 1
End With

myWkS.PrintOut Preview:=True

End Sub

HTH
Mick


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
Page numbers on copies of a single page worksheet sr accountant Excel Discussion (Misc queries) 1 May 7th 07 06:29 PM
Print a single sheet in Excel with consecutive page numbers cmompoohu Excel Discussion (Misc queries) 1 November 1st 06 07:05 PM
Converting multiple worksheet to a single page worksheet [email protected] Excel Discussion (Misc queries) 0 July 4th 05 06:26 PM
Converting a muliple page worksheet to a single page worksheet [email protected] Excel Discussion (Misc queries) 2 June 30th 05 09:40 PM
Newbie: How to Print by VBA a Single Page in a Worksheet L.A. Lawyer Excel Programming 1 December 22nd 03 10:53 PM


All times are GMT +1. The time now is 10:35 AM.

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"