Another way is to split this in two.
- At the workbook level you just store the previous worksheet and make it available as a new property of the workbook.
- At the worksheet level you use your Activate event procedure as usual. The difference is that you can now use a new property of the workbook that gives you the previous worksheet selected.
Remark: If you think it's possible that you work with several windows for the same workbook in the same instance of excel, don't forget to adapt the solutions.