invoice numbering

  • Thread starter Thread starter Tammy
  • Start date Start date
T

Tammy

I cannot figure out to have the invoice sheet
automatically fill in invoice numbers on it own. ex:
243,244,245,etc,
I am sure I am overlooking something that is right in
front of me.
Thanks
Tammy
 
Frank, Tammy - I just found this board after searching out the same issue on
the web for days! I had to create a template for invoicing that the techs
can take with them on their pc. Each tech would have a unique identifier, ie
first & last initial123. I need th einvoices to number sequentially, and
once a tech "saves as" a document the numbering has to remain on the
document, canceling out the sequential numbering which was commanded on the
template so that if the invoice is FL123, it will remain that on that
particular invoice. Does that make sense and can anyone help? thanks so
much!
 
Hi
depends at which point you want to create this number. One way:
1. Create a new workbook or open an existing workbook. Design
everything as you like, etc. You will dedicate a single cell for your
invoice number. Lets say a an assumption it is cell A1 on the first
sheet (name 'sheet1').
2. Save this Excel sheet.
3. Right click on the Excel symbol left to your menu entry 'File'.
Choose 'Code' in the context menu. The VBA editor will open.
4. Paste the following code into the VBA editor:
Private Sub Workbook_Open()
Worksheets("Sheet1").Select
Range("A1").Value = Range("A1") + 1
Range("B1").value = application.username
End Sub
5. Close the VBA editor, save the Excel file and close it.

This will increment A1 each time you open this workbook. A similar
result could be achieved using the beforeprint event (increments the
number each time you print the worksheet)
 
Back
Top