#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
invoice toolbar for invoice calcuation and assign number KarenY Excel Discussion (Misc queries) 15 March 16th 07 12:02 PM
How do I assign an invoice number using the invoice toolbar? Sharon Excel Worksheet Functions 1 December 23rd 06 09:32 AM
missing invoice toolbar when save customised invoice M.G New Users to Excel 1 September 26th 05 07:18 AM
Invoice templet Excel97 to 2003 invoice toolbar missing MarolynInMarion Excel Discussion (Misc queries) 0 August 19th 05 07:15 PM
How do I change the invoice number assigned in Invoice template... akress Excel Discussion (Misc queries) 1 February 28th 05 06:36 PM


All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"