You can make use of the before close event if the workbook is in a state to perform the second set of code.

How do you know the user has completed requried editing and is not just closing the file?