Please, review topics below to find answer to your question

File | Exit menu command

This is the simpliest command in the xlCompare. It closes opened workbooks and clears formatting added by xlCompare and closes the application.