Thanks for putting this together but unfortunately, I don't seem to be able to make it work. Do I need to define any parts of the code? I put it in it's own module and also tried adding it to the userform code too but no luck. I'll post a fuller picture of the setup I have:
My workbook has three worksheets. One is called "Master_Database", the other is "New_Entry" and the last "Print_Copy". The "New_Entry" sheet is just a button that one can click and it makes a userform pop up. All the userform boxes are filled in by the user and then the user clicks on a button at the bottom of the userform that I've called "Submit". This triggers the following code: As you can see, it sends the userform contents to the "Master_Database" worksheet as a row of data (and sends the contents of this row to a "Print_Copy" template (but that's irrelevant for now)), it then clears the userform ready for a new entry:
The "Master_Database" worksheet is laid out with the headings "Answer1", "Answer2", "Answer3" in cells "C49", "D49", "E49". In "B49" I've called it "UniqueID". In "B50" I have 000000 and in the rest of the row (C50, D50, E50), I have "Example".
Currently, when the userform is submitted, Columns C, D, E populate successfully but I would like when this happens, for Column B to aswell populate with 000001, 000002,000003 etc.
I think dangelor's suggestion is almost there but just having problems implementing it.
Thank you to everyone so far!
Bookmarks