Ok. so im creating a database type thing, that has an invoice (picking slip etc etc) type sheet which autofills details, and needs users to fill in others and print it so that parts and products can be reserved for that invoice.
what i was just asked to do is see if i could get a sequential numbering system appear on all invoices, as well as possibly save each invoice after it is filled in.
i dont think i can do it in excel, but probably in access. unfortunately, not only do i have no idea how to use access, but the company im doing this for doesnt want anything in access either.
so, i guess my question is, can it be done? and if so, how?
would i be able to link all the data inputted and retrieved (using vlookup) into another spreadsheet, that saves each new entry as a row with all the data?
any help at all would be good. or even a definate "No way man.. " would be greatly appreciated.
Thanks in advance,
Chris.
You can use the registry. Run this sub when you want a new number.
Sub NextNum() Const sAPP As String = "Excel" Const sSEC As String = "WorkOrder" Const sKEY As String = "WorkOrderNum" Const nDEF As Long = 0 Range("A1").Value = GetSetting(sAPP, sSEC, sKEY, nDEF) + 1 SaveSetting sAPP, sSEC, sKEY, NextWorkOrder End Sub
umm. would you be able to give me perhaps a step by step? i realise that you are doing this out of the kindness of your heart, but i have nfisorry.
if its too long and involved, i can google it. just give me the keywords if possible.
cheers for the speedy reply
Chris.
The code goes in a code module:
Adding a Macro to a Code Module
1. Copy the code from the post
2. Press Alt+F11 to open the Visual Basic Editor (VBE)
3. From the menu bar in the VBE window, do Insert > Module
4. Paste the code in the window that opens
5. Close the VBE to return to Excel
Then do Alt+F8 and run NextNum to see the next sequential appear in cell A1.
ok. thanks.
champion.
come to aus and ill buy you a beer :P
Chris.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks