Solved

Program doesn't end

Posted on 2000-04-06
4
135 Views
Last Modified: 2010-05-02
When developing a recent project, I noticed that when I close the application, the VB IDE still shows that the program is running. Is this a bug in VB6, or is my application still running even after I close it?
0
Comment
Question by:gferrell
  • 2
4 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2690517
how are you closing it? how many forms do you have open at the time you are closing?  are there hidden forms etc...
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 100 total points
ID: 2690594
Make sure you have unloaded all forms that the main form has loaded.  You can do this in the main form's Unload event:

Private Sub Form_Unload(Cancel As Integer)
    Dim frm As Form
    For Each frm In Forms
        If Not frm Is Me Then
            Unload frm
            Set frm = Nothing
        End If
    Next
End Sub

Also make sure to set all objects you created to nothing.
0
 
LVL 1

Expert Comment

by:prakashbitra
ID: 2690676
Use End to close your application.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2690685
prak I would recommend posting comments at this site, the person asking the question can accept any comment as an answer later
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question