I don't have a genie, and am trying to program the same soundbar to my remote. Maybe if you get the code, the same code will work for me.
I was working with the genie the other day at my friends out and constantly got the 'programming failed' issue. I reset his genie and re-tried the programming process and it worked just fine.
I don't think you actually have to click the 'it worked' on screen to get the code to 'stick'. After the power turns off, you should just be able to hit the select key to let it know it had the right code. That will save the code.