How to close application in VB
Starting a program in VB, I drive another application by sending commands to perform. But that is not the problem. I would like to end this program, close this application. I tried something like:
Code:
System.Application.DisplayAlerts = False
But I feel that this only works for Excel. Using this command to my app, I have a message error: "Object does not support this property or method." Is there more generally a command that disables the dialog boxes, regardless of the software (not necessarily of the Office)?
Re: How to close application in VB
I do not see how DisplayAlerts closes an application. This is a property that disables the warning message in Excel. Nothing to do with completing a program.
To answer your question, there is no command to disable the VB dialog boxes in other applications as Office, and fortunately.
Re: How to close application in VB
Yes sorry, I meant "disable dialogs". Otherwise, I found in my application with an option to not ask the user validation at the close. Suddenly, with a "System.Application.Quit", the application quits without asking.
Re: How to close application in VB
But what exactly you wanted? A command to disable the MessageBox or a command to exit a program? Disable dialog box like "Are you sure you want to leave." or anything else? This is not the same thing too.
Re: How to close application in VB
if your trying to close the program it would be me.close()
but I can't really understand what your asking for.
Re: How to close application in VB
Your problem is not at all understandable, please detail it a bit so one can understand what you are really looking for. Do post back... :thumbup1:
Re: How to close application in VB
Periodically it may be necessary for a programmer to close down another application from Visual Basic code. For more information, you need to check out the following link. VB doesn't have the best memory management and calling end doesn't always clean the memory properly if there are still loaded forms present.