Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Invoice
Dear Mr's and Mrs's
Years ago Tom Ogilvy and Ivor Merck assisteg me in the same problem. The solution was to save the critical data on the invoice in an invoice record sheet, then look for the last saved invoice number. This would be the one you just saved, then add 1 to the number and enter it on the next invoice. Johan Snyder South Africa |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Invoice
Sorry this was the code used....
Sub TransmitAndClearInvoice() ' Makro by Iwer Morck ' Sheets("Invoice").Select If [C12].Value = "" Then Exit Sub If [B20].Value = "" Then Exit Sub If [K2].Value = "" Then Exit Sub With Sheets("InvRecords") x = .Cells(.Rows.Count, 1).End(xlUp).Row + 1 If .Columns(1).Find(What:=[K2], _ LookIn:=xlValues, _ LookAt:=xlWhole) Is Nothing Then r = 20 Do .Cells(x, 1).Value = [K2] ' Invoice Number .Cells(x, 2).Value = Date ' Date .Cells(x, 3).Value = [C12] ' Customer Number .Cells(x, 4).Value = [C13] ' Name .Cells(x, 5).Value = [C14] ' Address .Cells(x, 6).Value = [C15] ' Code .Cells(x, 7).Value = [C16] ' Phone .Cells(x, 8).Value = [J16] ' Sales Consultant .Cells(x, 9).Value = Cells(r, 2).Value ' Item Number .Cells(x, 10).Value = Cells(r, 3).Value ' Description .Cells(x, 11).Value = Cells(r, 8).Value ' Unit .Cells(x, 12).Value = Cells(r, 9).Value ' Qty .Cells(x, 13).Value = Cells(r, 10).Value ' Price .Cells(x, 14).Value = Cells(r, 11).Value ' Total x = x + 1 r = r + 1 Loop Until Cells(r, 2).Value = "" Range("C12").Value = "" Range("ITEM_NO").ClearContents Range("QTY").ClearContents Range("K2").Value = Range("K2").Value + 1 Range("C12").Select Else MsgBox "The invoice number already exists" End If End With End Sub "Johan Snyder" wrote in message ... Dear Mr's and Mrs's Years ago Tom Ogilvy and Ivor Merck assisteg me in the same problem. The solution was to save the critical data on the invoice in an invoice record sheet, then look for the last saved invoice number. This would be the one you just saved, then add 1 to the number and enter it on the next invoice. Johan Snyder South Africa |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
invoice toolbar for invoice calcuation and assign number | Excel Discussion (Misc queries) | |||
How do I assign an invoice number using the invoice toolbar? | Excel Worksheet Functions | |||
missing invoice toolbar when save customised invoice | New Users to Excel | |||
Invoice templet Excel97 to 2003 invoice toolbar missing | Excel Discussion (Misc queries) | |||
How do I change the invoice number assigned in Invoice template... | Excel Discussion (Misc queries) |