Solved

Program doesn't end

Posted on 2000-04-06
4
137 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending a email via excel using vba 6 119
Modifying Conditional Format from VBA code 3 85
Set WorkSheet  not Working 9 62
add criteria to query in VB, Access 2003 2 49
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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

710 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