ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I set up incremental numbering of Invoices in Excel? (https://www.excelbanter.com/excel-programming/328908-re-how-do-i-set-up-incremental-numbering-invoices-excel.html)

Office User

How do I set up incremental numbering of Invoices in Excel?
 
I don't know where my brain lapse is happening but I'm struggling trying to
figure out this code. I'm utilizing the one to have text file store the
numbers.

My InvoiceNumber.txt file is located on c:\. The file is blank except for
the number 100. Here's part of your code with my file location and name.

Public Function NextSeqNumber(Optional sFileName As String, Optional
nSeqNumber As Long = -1) As Long
Const sDEFAULT_PATH As String = "c:\"
Const sDEFAULT_FNAME As String = "InvoiceNumber.txt"
Dim nFileNumber As Long

When I open the template file, I don't get any error message but it doesn't
update the cell with a number. Currently cell L4 is blank.

Public Sub Workbook_Open()
ThisWorkbook.Sheets(1).Range("L4").Value = NextSeqNumber
End Sub

Both the Function and Sub are saved in This.Workbook.

I'm sure it's an obvious oversight on my part but any help would be greatly
appreciated.

Thanks,
Marcia


"JE McGimpsey" wrote:

A couple of ways:

http://www.mcgimpsey.com/excel/udfs/sequentialnums.html



In article ,
TFT wrote:

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.



Zack Barresse

How do I set up incremental numbering of Invoices in Excel?
 
Hello,

This may help ...

http://www.vbaexpress.com/kb/getarticle.php?kb_id=351


--
Regards,
Zack Barresse, aka firefytr

"Office User" wrote in message
...
I don't know where my brain lapse is happening but I'm struggling trying to
figure out this code. I'm utilizing the one to have text file store the
numbers.

My InvoiceNumber.txt file is located on c:\. The file is blank except for
the number 100. Here's part of your code with my file location and name.

Public Function NextSeqNumber(Optional sFileName As String, Optional
nSeqNumber As Long = -1) As Long
Const sDEFAULT_PATH As String = "c:\"
Const sDEFAULT_FNAME As String = "InvoiceNumber.txt"
Dim nFileNumber As Long

When I open the template file, I don't get any error message but it
doesn't
update the cell with a number. Currently cell L4 is blank.

Public Sub Workbook_Open()
ThisWorkbook.Sheets(1).Range("L4").Value = NextSeqNumber
End Sub

Both the Function and Sub are saved in This.Workbook.

I'm sure it's an obvious oversight on my part but any help would be
greatly
appreciated.

Thanks,
Marcia


"JE McGimpsey" wrote:

A couple of ways:

http://www.mcgimpsey.com/excel/udfs/sequentialnums.html



In article ,
TFT wrote:

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.





Office User

How do I set up incremental numbering of Invoices in Excel?
 
Thanks Zack. It did help and I've bookmarked the site for future reference
as I learn VBA. I've only muddled my way thru figuring out some of the VBA
stuff so far but will be taking an actual VBA class in another month.

Thanks again,
Marcia

"Zack Barresse" wrote:

Hello,

This may help ...

http://www.vbaexpress.com/kb/getarticle.php?kb_id=351


--
Regards,
Zack Barresse, aka firefytr

"Office User" wrote in message
...
I don't know where my brain lapse is happening but I'm struggling trying to
figure out this code. I'm utilizing the one to have text file store the
numbers.

My InvoiceNumber.txt file is located on c:\. The file is blank except for
the number 100. Here's part of your code with my file location and name.

Public Function NextSeqNumber(Optional sFileName As String, Optional
nSeqNumber As Long = -1) As Long
Const sDEFAULT_PATH As String = "c:\"
Const sDEFAULT_FNAME As String = "InvoiceNumber.txt"
Dim nFileNumber As Long

When I open the template file, I don't get any error message but it
doesn't
update the cell with a number. Currently cell L4 is blank.

Public Sub Workbook_Open()
ThisWorkbook.Sheets(1).Range("L4").Value = NextSeqNumber
End Sub

Both the Function and Sub are saved in This.Workbook.

I'm sure it's an obvious oversight on my part but any help would be
greatly
appreciated.

Thanks,
Marcia


"JE McGimpsey" wrote:

A couple of ways:

http://www.mcgimpsey.com/excel/udfs/sequentialnums.html



In article ,
TFT wrote:

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.






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com