I like to run some code when a user closes my ms 2000 app. This is being bypassed by the user pressing alt F4 and not using the exit buttons provided, how do i disable this functionality? Alternatively, is there a way to catch this and run some code. Im trying to avoid using a hidden form by the way.
Share
You should be able to use an autokeys macro.
http://msdn.microsoft.com/en-us/library/aa159349%28office.10%29.aspx
EDIT re Conmments
It may suit to create a hidden start-up form or to use your main menu to cancel the close event unless your button is pressed:
From: http://tek-tips.com/faqs.cfm?fid=1870