So I think the problem is that your code doesn't do what you want it to, not that you cannot "select" the correct code to run.
-Code1 will load the data from the userform into the first empty row
-Code2 will load the data from the spreadsheet into the userform
You want:
-that when combobox1 is changed, if the value of combobox1 is new it will do nothing, otherwise it will run code2
-When commandbutton1 is pressed, if combobox1 is new it will run code 1, else it will load the userform into the row corresponding to combox1 value, this is the inverse of code 2. Therefore, you need to write a code 3 for that and use:
Bookmarks