View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
TFT TFT is offline
external usenet poster
 
Posts: 2
Default How do I set up incremental numbering of Invoices in Excel?

Oops .... I was a bit hasty with my follow up to your suggestion Mike, I have
come up against a snag with this procedure.
Until now I have been using M/S Access 2000 to run my invoicing system and
in this it was possible to keep a record of all my invoices in a database,
thus giving me access when I needed to reference them.
How can this be done in Excel? It would appear that each time I open the
workbook, although a new number is generated there is no going back to the
last report.

"Mike Fogleman" wrote:

With your workbook open, right-click the sheet tab and from the menu that
pops up select View Code. This will bring up a second window called the
VBE - Visual Basic Editor. All macros go here. In the left window is a
directory tree of all open (Projects) Excel workbooks and add-ins. One of
them will be VBAProject (Your workbook name). Under that is a folder named
Microsoft Excel Objects which has a list of all the worksheets and at the
bottom of that list an object called ThisWorkbook with an Excel icon on it.
Double-click that icon to display its code module in the right window pane.
Copy/Paste my code into that window. Carefully edit my code everywhere it
has H1 and replace it with the cell address where you want the incrementing
numbers. Save your workbook. Now every time you close and re-open the
workbook, the number in the cell you chose will increase by 1.
You can custom format the cell with "000" that will display leading 0's for
numbers less than 100 eg. (009, 099, etc)
Mike F
"TFT" wrote in message
...
Please could you clarify. I am not familiar with macros at this stage
although I'm working on it. Am I to assume that the code you have

presented
is inserted in a newly created macro?

"Mike Fogleman" wrote:

Say your invoice number is in cell H1, put this code in the ThisWorkbook
module:

Private Sub Workbook_Open()
Range("H1").Value = Range("H1").Value + 1
Range("H1").Copy
Range("H1").PasteSpecial Paste:=xlValues, Operation:=xlNone,

SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False

Change "H1" to whatever cell you want to use.

Mike F
"TFT" wrote in message
...
I am trying to create a procedure within Excel which will allow me to
automatically bring up a sequentially numbered invoice for my small
business.
Designing invoices is not a problem but trying to automate them so

that
they
appear with a follow up number is eluding me.