Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Page numbers on copies of a single page worksheet | Excel Discussion (Misc queries) | |||
Print a single sheet in Excel with consecutive page numbers | Excel Discussion (Misc queries) | |||
Converting multiple worksheet to a single page worksheet | Excel Discussion (Misc queries) | |||
Converting a muliple page worksheet to a single page worksheet | Excel Discussion (Misc queries) | |||
Newbie: How to Print by VBA a Single Page in a Worksheet | Excel Programming |