| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 30080 | 2003-02-10 01:38:00 | MS Excel HELP!!!!! | estarriol (3131) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 119875 | 2003-02-10 01:38:00 | I have designed a layout for an invoice. I would like to automatically increment invoice number for the next blank invoice. I would also like to automatically name the file with the invoice number ie: invoice1.xls invoice2.xls etc... for each invoice. is this possible? and if so, how do I do it? |
estarriol (3131) | ||
| 119876 | 2003-02-10 03:34:00 | I think you may have to be a bit more specific. Do you have different file for each invoice? different worksheet, different section of worksheet or what. Sounds like what you suggest could easily be done with a visual basic macro, but without more specificity its hard to know offhand if and how it might be done otherwise. |
rugila (214) | ||
| 119877 | 2003-02-10 04:35:00 | Hi, as Rugila says can be easily done with a macro. May I suggest an alternative though as you could end up with an awful lot of Excel files, each only having one sheet with limited info if all your doing is saving the invoice. A believe a better approach would be to store all your invoice details in one or more sheets (one invoice record per row) and feed this through to the Invoice form. This way invoice numbers & details are held in a data sheet and you can easily replicate the invoice on the form by using an invoice number and a vlookup in the forms fields. This way each sheet can hold up to 65535 invoices, each with up to 256 fields worth of details. In the data sheet you can increment the invoice number by using a simple formula like row()-1 presuming your starting at invoice number one and have header fields in row 1. Its just a suggestion - up to you how you want to do it. cheers Parry |
parry (27) | ||
| 119878 | 2003-02-10 09:29:00 | Copy this to a standard module macro will execute on opening of your workbook Sub auto_Open() Range("A1").Value = 1 + Range("A1").Value ActiveWorkbook.Save ActiveWorkbook.SaveAs ([sheet1!A1]) End Sub |
seacrest (2893) | ||
| 1 | |||||