Re: msgbox code in one line
Firstly, I don't really see what the connection is between the first code snippet and the second, unformatted one. Secondly, why do you think you need to condense either of them to one line?
Are you saying that you want to be able to prompt the user to exit the application from multiple places? If so then just put the code somewhere common, e.g. a method in a module, and then call that from anywhere you like. You can call Application.Exit to exit the application, so it doesn't matter that you can't call Me.Close in a module.