I want Autohotkey to monitor an Excel 2010 window for the Close Command, intercept and cancel the command, run a script, and then finally close the window.
I understand that OnClose and BeforeClose are existing commands in vba, but I canNOT use .xlsm (Macro-Enabled) worksheets and this is on at least 5 different workstations so Personal.xlsb isn't an option either.
I've found several references that vba is "easy" to translate to COM which I'm just learning how to use, but Ive been beating my head against the keyboard for a week now and I can come up with no syntax that will let me monitor a window for the "Close" command.
I was thinking most recently, OnMessage, but I cannot come up with the syntax for that either and Google has been useless, I can't even find anyone else asking about this! Please Help!