#1
|
|||
|
|||
Add a serial number to an invoice
I write a maximum of 100 invoices per year. All invoices for 2015 should be in workbook 2015'´.
Every time I access workbook 2015 and enter data, I want an incremental serial number to appear in E15. Can this be done, or is there a better solution for invoices? |
#2
|
|||
|
|||
This can be done using an on open command. This will be in the visual basic editor under thisworkbook.
Code:
Private Sub Workbook_Open() Range("E15").Value = Range("E15").Value + 1 End Sub Let me know if this is what you are looking for. Thanks |
#3
|
|||
|
|||
Invoice numbering
Many thanks, but unfortunately you are talking to a dumbo! I can handle Excel but have no idea what an Open command is, where and how do I insert the code you sent me etc..
What I am doing right now is opening Workbook called invoices 2015, renaming next new sheet as 101 (for example), and then manually typing 101 into E15. New invoice.....new worksheet....and so on. Not at all satisfactory. Thanks for the help |
#4
|
|||
|
|||
You are not a dumbo. I am the dumbo for assuming that everyone knows how to access certain things. In order to have this code work for your workbook you will need to do the following.
When your workbook is open press ALT + F11 This will open up the Visual Basic Editor The Visual Basic Editor VBE is where code goes. On the left of this screen you will see some small Icons saying Sheet1, Sheet2, Sheet3 Or whatever your worksheets are called. and one called ThisWorkbook. Double click on ThisWorkbook and you will see 2 dropdown lists above the white background editor. Click the one to the left and select Workbook. Then click the one to the right and select Open. Some code will automatically fill in to the white background. Clear this out and then paste in the code I provided you. Save your workbook as a backup and then it should run everytime the workbook is open. If you have issues with Excel saying Macros are disabled let me know and I will guide you through on how to fix that for the version of Excel you are using. You can find a lot of guides out there on the internet if you dont want to wait. Let me know how it goes. Thanks |
#5
|
|||
|
|||
Invoice numbering
Thanks a million Excelled software. This has opened a whole new world for me. I shall now follow your instructions and I shall send you the results!
Finally I can get behind the printed User Interface to the code! Regards |
#6
|
|||
|
|||
Ok all worked as you instructed, but "The following features cannot be saved in macro-free workbook:
* VB project Could you tell me where to find File Type list, or what are next step. Thanks again. |
#7
|
|||
|
|||
No problem you just need to save your workbook as a xlsm this is the second option for file extensions in the save as dialog box.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Converting serial number to years, months and days | hannu | Excel | 6 | 02-14-2013 09:21 PM |
Increase serial number for every print | atomtm | Word | 1 | 06-15-2012 05:39 AM |
Serial Number Issue | rehan5001 | Excel | 1 | 06-08-2011 02:46 AM |
Invoice Number Generation | mrphilk | Excel | 2 | 06-08-2010 12:39 PM |
Help needed using the serial number date with sumifs - whole office is stumped | FraserKitchell | Excel | 3 | 01-06-2010 12:24 PM |