Add commands to combobox

How would I add a command to a combobox to use in a button? Someone gave me some code to do this but it didn’t work.

Just create the combobox in the DoClick function of the button.