With what I sent the user clicks a Client name in the Table on the Orders sheet and an Invoice is created for that Client doing just as you want.
You are right! I didn't look very well at it and just run it through the VBE and of course, I didn't see what your code is actually doing.
Like you said, it works exactly as I asked. Thank you for that. The code you wrote to achieve this is not very clear to me, but that is not absolutely needed.
you cannot run a Worksheet_SelectionChange code through VBE. Did you try to copy/paste the code to a Standard Module? That will not work.
I know now, but I didn't knew before. So I've learned again, thank you for that.
Have you actually tested using the file I sent?
I did, but not in a proper way. I did test it again now, like you explained in your second answer, and it works beautifully!
Why would you want a Combobox created each time you want to create an invoice for a client? Why not just have a Combobox on the sheet anyway, and select a Client from there?
Seems far simpler to just select a Client directly from the Table on the Orders sheet and create an invoice for that client automatically. That is what the code I supplied does.
Correct, that seems far simpler. Thank you.
Why was this not mentioned in your original post?
Because, I thought it would be better to ask little by little in stead of asking a lot at once. I'm sorry.
Where is that column? Why have you not included it in your sample file? Your explanation reads as if you want new "Yes"/"No" column created each time an invoice is needed, which, of course, is totally impractical.
In my sample file, the column was not included yet.
I would like just two additional columns. One with the mention "invoice created" to prevent that the invoice should be created a second time. And a second column with a "yes" choice to move the invoice lines to the sheet archives.
ou mean you want a new sheet created every time an invoice is created? How should the new sheet be named? You would soon end up with a workbooks containing hundreds of sheets, if not thousands!
Certainly, there should not be created a new sheet every time an invoice is created.
I suggest you decide just what it is you want, create a sample workbook that clearly shows how the Orders sheet should be and a separate sheet(s) to show your required result. Then you may get an answer you want.
The sample I sent was just a sample to see the technique to do what I wanted.
I will now send my original workbook an a word doc with some explication.
Your help is much appreciated. Thank you so much.