Either in the initalize event, before the code to deal with checkboxes/listbox.
Or in the Click event of the button

Private Sub CommandButton1_Click()

' code to do thing with cells
' ....

' now show userform
UserForm1.Show

End Sub