Invoice Numbering in Excel 2003

G

Guest

I have created an invoice in Excel 2003 which I would like a consecutive
invoice number to be assigned to each invoice. I cannot figure out to create
one. I do know that the number I wish to start my invoices with needs to be
saved in notepad or wordpad. That's as far as I was able to get. Can someone
help?
Thank you
 
G

Guest

using some simple code might do what you want:

Assume cell A1 contains the invoice number.
Name cell A1 as InvNum

then in a code module:

Sub IncrementInvNum()
Range("InvNum") = Range("InvNum") + 1
End Sub

This sub needs to be called by the same action that creates a new blank
invoice.
If you are using a Template, then in the ThisWorkbook module use:

Private Sub Workbook_Open()
IncrementInvNum

End Sub

If you are creating a new blank invoice with a command button, put the call
inside the macro which is assigned to the button.
 

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

Top