That's redundant code since the before close event takes place on closing the workbook, so why closing it (again), and thereby firing a new before close event?
This could be a cause of your issue since (as mentioned in my post #2) a workbook needs to be closed properly for Excel to mark the workbook as a "full access" file, as opposed to read-only
(more specifically, for Excel to delete a hidden and simultaneously created file with a similar name preceded by the characters ~$).
Using the Save method would then be more obvious than the Close method.
Furthermore, your code acts on the active workbook, which is not necessarily the same workbook as the workbook in which the before close event occurs.
So if you still want to play it safe, you should use the code below, although I would recommend not to use it, i.e. get rid of this event handler.
If you have applied the modification I suggested in my post #2 then you should be fine.
In case there's no change, let me know.
Bookmarks