Solved

Program doesn't end

Posted on 2000-04-06
4
133 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now