Incrementing Cell Numbers

  • Thread starter Thread starter Lance W. Grimes
  • Start date 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
 
Place this in ThisWorkbook module:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Sheets("Sheet1")
.[A1].Value = .[A1].Value + 1
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

Back
Top