In that case, you might consider re-working your code, breaking it into separate routines, such that you can exit when the userform is called, then restart with a variable that gets passed telling Word where to resume when the userform is closed.