How to Close VB and VB6
- 1). Click the Windows "Start" button and select the compiler you want to use. VB.NET uses Visual Studio, which is in the "Microsoft .NET" program group. VB6 is in the "Microsoft Visual Basic" program group.
- 2). Open the project in the compiler software. After you load the project, open the code file you want to use to close the VB application.
- 3). Type the following code if you are using VB6:
Unload Me
Type the following code if you are using VB.NET:
form.Close()
When you use the "form.Close()" method, replace "form" with the main form name in your application. - 4). Click the "Run" button to execute the code in your compiler. The code runs in the debugger, so any errors are displayed with the associated line number if any code errors are found.