RE: HOW DO I SETUP NUMBERING INVOICES

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Dear Jo

I would suggest to store the invoice number into an external file or a text
file in the same folder. The below solution increments the number everytime
you open; provided you save the workbook everytime you open.

If you are new to macros the set the Security level to low/medium in
(Tools|Macro|Security). 'Launch VBE using short-key Alt+F11. On the left
treeview right double click 'This Workbook '. Paste the below code...

Private Sub Workbook_Open()
Range("A1") = Range("A1") + 1
End Sub

If you would prefer to increment the number on each save, then paste the
below code.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If MsgBox("Do you want to increment the invoice number", vbQuestion +
vbYesNo + vbDefaultButton2) = vbYes Then
Range("A1") = Range("A1") + 1
End If
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"Jo Ann P" wrote:

I am trying to set up invoicine where the number will change every time I
open it-to a next available number
.



Relevant Pages

  • Increment invoice number
    ... I am looking for a formula or a way to increment my invoice number by 1 ... everytime my template is opened. ...
    (microsoft.public.excel.worksheet.functions)
  • Auto increment a cell
    ... I have an invoice in excel 2007 template in which I want to increment the ... invoice number everytime I save it. ...
    (microsoft.public.excel.programming)
  • Re: Invoice Numbering
    ... it is a possible solution to find the highest value and then increment ... NOT get written back then you risk applying duplicate invoice numbers into ... >> lastinvoicenumber. ... > wouldn't it be a whole lot easier to just retrieve the highest number from ...
    (microsoft.public.access.forms)
  • Re: keeping track of "Escaped" Autonumber records (Updated sample code)
    ... The last records primary key value incremented by 1 or ... Exit Function ... >> Autonumber field to generate the Invoice ID. ...
    (microsoft.public.access.formscoding)
  • Re: keeping track of "Escaped" Autonumber records (Updated sample code)
    ... The last records primary key value incremented by 1 or ... Exit Function ... >> Autonumber field to generate the Invoice ID. ...
    (microsoft.public.access.forms)