Hi Norman,
I am working with the VBA code that you've refered many people to and it
kinda works.
The date function works however the sequential numbering is not working.
I've looked at the code over and over again and there are no errors according
to the editor.
I'm using Excel 2000 and trying to create my own invoice template.
below is the code i'm using.
Thank you
Ken
Sub INVOICE_NUMBER()
Const sAPPLICATION As String = "Excel"
Const sSECTION As String = "Invoice"
Const sKEY As String = "Invoice_key"
Const nDEFAULT As Long = 1&
Dim nNumber As Long
With ThisWorkbook.Sheets("Invoice")
With .Range("E3")
If IsEmpty(.Value) Then
.Value = Date
.NumberFormat = "dd mmm yyyy"
End If
End With
With .Range("E4")
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