I have a workbook with a userform that closes the workbook when the user closes the form.

Please Login or Register  to view this content.
One of the command buttons, when clicked, opens another workbook, feeds some data into it, closes and saves that workbook (I have my reasons), then opens it again, running the auto_open subroutine, which is similar to the above (opening a userform, and then closing the workbook when finished). It is my intention that at that point, the 1st workbook would also close, but it doesn't. Here's the code:

Please Login or Register  to view this content.
I put a debug stop on the "ActiveWorkbook.RunAutoMacros xlAutoOpen" line and on the "Me.Hide" line. It stops on the first one, and when I proceed, it opens the 2nd workbook and userform correctly, and closes it when I hit the Close button, but never reaches the Me.Hide debug stop. It just exits from the user form but doesn't close the workbook. Any suggestions on how why it doesn't hit the Me.Hide code?