Can Excell create a running invoice NUMBER?

  • Thread starter Thread starter BigG
  • Start date Start date
B

BigG

Lets say I was to create a form that will be used over and over, but
everytime I fill it out and print it I need it to generate a number
that changes 1 digit each time it is pulled up and printed.

Example, I have a blank invoice, then I fill in the fields as needed
and the invoice has a number on the top numbered 00001
so I print it and close the file. Then tomorrow I open it and do the
same thing except the invoice number now is set at 00002.

I am not sure if Excel can do this or not.
This would be pulling a rabbit out of a hat if this can be done :cool:


G.
 
Hi
you can process the worksheet_beforeprint event:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheets("Sheet1").Range("A1") =
Sheets("Sheet1").Range("A1") + 1
End Sub

this will increment cell A1 on sheet1 by one for each print-job. You
have to put this code into the workbook module of your workbook

HTH
Frank
Lets say I was to create a form that will be used over and over, but
everytime I fill it out and print it I need it to generate a number
that changes 1 digit each time it is pulled up and printed.

Example, I have a blank invoice, then I fill in the fields as needed
and the invoice has a number on the top numbered 00001
so I print it and close the file. Then tomorrow I open it and do the
same thing except the invoice number now is set at 00002.

I am not sure if Excel can do this or not.
This would be pulling a rabbit out of a hat if this can be done
:cool:
 

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