New form number for each page printed

J

jimqual7

I have created an Excel form that will be filled in by hand. I need to print
hundreds of this form but I would like each form to be printed with a new
reference number such as 00001, 00002, 00003, 00004, etc.
 
J

jimqual7

Thanks, I was able to modify it to just print the CopieNumber without the
CopiesCount.
Now, how can i continue printing where I left off, such as today I print
numbered pages 1 thru 25. If I print again tomorrow can I print pages 26 thru
50?
 
R

Ron de Bruin

Try this

Sub PrintCopies_ActiveSheet()
Dim CopiesCount As Long
Dim CopieNumber As Long
CopiesCount = Application.InputBox("How many Copies do you want", Type:=1)

With ActiveSheet
If .Range("A1").Value = "" Then .Range("A1").Value = 0
For CopieNumber = .Range("A1").Value To (CopiesCount + .Range("A1").Value - 1)
'number in cell A1
.Range("a1").Value = CopieNumber + 1

'number in the footer
'.PageSetup.LeftFooter = CopieNumber

'Print the sheet
.PrintOut
Next CopieNumber
End With

End Sub
 
R

Ron de Bruin

Use this one

Sub PrintCopies_ActiveSheet_2()
Dim CopiesCount As Long
Dim CopieNumber As Long
CopiesCount = Application.InputBox("How many Copies do you want", Type:=1)

With ActiveSheet
If Not IsNumeric(.Range("A1").Value) Then .Range("A1").Value = 0
For CopieNumber = 1 To CopiesCount
'number in cell A1
.Range("a1").Value = .Range("a1").Value + 1

'Print the sheet
.PrintOut
Next CopieNumber
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top