Thanks, it works fine!
But why UBound?

Another problem, I use a button click event to show all the results in a listbox. I clear the listbox at the top. The first button click gives me the correct combinations but if I change some checkboxes and click the button again I get the same result. I need to restart the program to do a new calculation.