I have an excel sheet to print a set of 3 pages which I use for a timesheet. I need some kind of macro which can change numbers after every three sheets printed . So, the first three sheets are 0001 and next three 0002 next three 0003, so on.
If possible, I need to be able to start for where I left off. Here is what I've tried so far:
Sub PrintCopies_ActiveSheet()
Dim CopiesCount As Long
Dim copynumber As Long
CopiesCount = Application.InputBox("How many copies do you want?", Type:=1)
'Now the program wants you to input how many pages you like to print.
'You can input 100 here.
For copynumber = 1 To CopiesCount
With ActiveSheet
.Range("E1").Value = copynumber 'I assume your invoice number is in cell E1.
For i = 1 To 3
.PrintOut 'Print the sheet
End With
Next copynumber
End Sub
Couple of problems:
- It doesn't print the sheet three times with the same number
- I also need to the number to have leader zeros (eg, 0001, 0002 ... 000n)
Any solutions?
edited it a bit
? Can you explain what you tried to get it working so we can see where it's gone wrong?