I'm running Excel 2016. I have xlsm file that hides the application window when its userforms are running. If I attempt to close another Excel workbook (Book1) that has no macros, the Excel window for the xlsm appears visible and becomes the active workbook, and Book1 still remains open. I've tried to drop a snippit of code in the BeforeClose event something akin to
This doesn't change any of the behavior. Can someone please explain what might be happening here? Much regards.
Code:
If wb.Name <> ThisWorkbook.Name Then wb.Close
End If