I assumed that any script put in that location would execute upon the closing of the database. However, when I run the script through the debugger, or add a message box there - I see that it isn’t executed.
My guess is that you have the database open in the designer. So although you close the database in your client, Notes sees it still open in the designer. Close it there also and your messagebox will show.