This is the code for the main userform

I could have (should have) used a function to manage the different buttons.  To save time, I didn't revise the code.