On Excel Invoices it gives an invoice number-can be seq #'d???

G

Guest

I want to produce invoices(2 copies) that are sequencially numbered so that I
can keep up with them. Any way to do this or am I better off just keeping
excel spreadsheet to refer to.?
 
G

Guest

From a previous posting by JE Mc Gimpsey
This will autonumber your invoice on opening. You can print 2 copies, and
save as the invoice number

Private Sub Workbook_Open()
Const sAPPLICATION As String = "Excel"
Const sSECTION As String = "Invoice"
Const sKEY As String = "Inv_key"
Const nDEFAULT As Long = 1&
Dim nNumber As Long

With ThisWorkbook.Sheets("Sheet1")
With .Range("H10")
If IsEmpty(.Value) Then
.Value = Date
.NumberFormat = "dd mmm yyyy"
End If
End With
With .Range("H10")
If IsEmpty(.Value) Then
nNumber = GetSetting(sAPPLICATION, sSECTION, sKEY,
nDEFAULT)
.NumberFormat = "@"
.Value = Format(nNumber, "0000")
SaveSetting sAPPLICATION, sSECTION, sKEY, nNumber + 1&
End If
End With
End With
End Sub
 
G

Guest

Oops, my bad - it appears that .txt method was posted by Dick Kusleika rather
than by JE M. although I know that similar method has been attributed to JE
M. in the past. In either case, the method is the same, just wanted to give
credit where credit is properly due.
JLatham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top