I found a thread here:
http://www.excelforum.com/excel-general/590510-sequential-numbering-of-invoices-when-printing.html
...with a macro to print and have a number on the worksheet change sequentially each time the sheet is printed.
This is exactly what I need for the macro to do, but I can't seem to figure out how to get it to work for me. I need cell "S1" to start at 4000 and change by one each time it is printed.
The worksheet is currently being used as just a blank form that is hand written on.(I will build a userform to fill in and save as pdf at a later date)
I copied and edited the macro(originally written by royUK) and assigned it to a textbox on the right of the worksheet. See attached
Any help getting the macro to run successfully or help explaining what I did wrong is appreciated.
EDIT: currently using the print preview to save our trees until I can get the macro to run correctly
EDIT#2:
Here is the macro code that I was trying to use:
![]()
Sub PrintBlanks() Dim i As Long Dim x As Long Dim Cell As Range i = Application.InputBox(" Enter How many copies that You require here?", "Number of Copies Required Input Box", Type:=1) For x = 1 To i With ActiveSheet .Cells(0, 18).Value = .Cells(0, 18).Value + 1 .PrintPreview 'for testing, use next line for actual print '.PrintOut End With Next x End Sub
Bookmarks