Your question is a little ambiguous, but I will try to answer what I think
you are asking.
When you use a yes/no, true/ false or 1/0 value on a UserForm with the form
visible, if either option says exit sub from the UserForm code module, the
program reverts back to the calling code. Now, the calling code could be in
a sheet module, a VBA module (Module1) or conceivably in the UserForm
_Ininialize code if the option is attached to one of the UserForm controls.
In any event, to get back to the main procedure, you should end sub in both
options of your yes/no code and be
sure to Unload UserForm# (# means appropriate number) if you have no further
use for any of the control values that are on the form.
Illustration:
VBA Module contains Main Sub
UserForm Initializes ListBox Control
ListBox Control contains Option code with MsgBox Yes/No option
If MsgBox = No > Exit Sub
Else
MsgBox = Yes Then Do Something
End Sub
When the ListBox code has executed it will end the sub whether the option is
yes or no. VBA will then query the next step of the last procedure that did
not execute the End Sub command. In this illustration that would be the main
procedure because the initialize procedure completed after it set up the
ListBox. So the code automatically goes back to the main procedure to the
next unexecuted step and continues if the UserForm is Unloaded or Closed.