ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Print sequential page numbers on one worksheet printed multiple ti (https://www.excelbanter.com/excel-worksheet-functions/38876-print-sequential-page-numbers-one-worksheet-printed-multiple-ti.html)

2 hard basket

Print sequential page numbers on one worksheet printed multiple ti
 
I have made a form made up of one worksheet only but each time I print it I
want it to have a sequential page number for eg. 0001 to 10,000. Basically
so that each form has a recorded number that can be used as a reference.

Damon Longworth

You could use a macro to increment the cell. In the workbook module, try
something similar to:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Range("A1").Value = Range("A1").Value + 1
End Sub


It will add 1 to A1 before each printing.

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"2 hard basket" <2 hard wrote in message
...
I have made a form made up of one worksheet only but each time I print it I
want it to have a sequential page number for eg. 0001 to 10,000.
Basically
so that each form has a recorded number that can be used as a reference.





All times are GMT +1. The time now is 07:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com