Incrementing Cell Numbers

  • Thread starter Lance W. Grimes
  • Start date
L

Lance W. Grimes

All:

I have created an excel "Workorder" form for our employees to write in what
machine they are working on, what parts they used, and how long they spent
on the repair...

The problem... I need to print out hundreds of these forms for the men to
use, and each copy of the form needs to have an unique number.

Is there a way to program a cell to automatically increment by 1 every time
it is printed? Again, I need to print hundreds at a time, and I need them
to automatically increment by 1.

TIA,
Lance
 
J

Jason Morin

Place this in ThisWorkbook module:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Sheets("Sheet1")
.[A1].Value = .[A1].Value + 1
End With
End Sub
 
Top