Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Best place to put clean up code on exit

Posted on 2006-04-06
2
Medium Priority
?
128 Views
Last Modified: 2010-05-03
I've got some code to clean up a few things when exiting my program. I inserted the sub routine's name into the Form's Unload event. It worked initially in the testing stages but doesn't seem to be working when the actual program has been running for a while. I normally close the program out using the close (X) button in the upper right. I'm wondering if there's a better place to stick the exit code, or if it's just a matter of narrowing down what's causing it not to run. Thanks.
0
Comment
Question by:JohnDoeSr
2 Comments
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 1000 total points
ID: 16395282
I would put a break point on the sub routine call in the Unload event. Then when it hits that point,hit F8 to step through one line at a time. That should allow you to see what is happening.
0
 

Author Comment

by:JohnDoeSr
ID: 16408546
Yep that helped to find it. Thanks again!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…
Suggested Courses
Course of the Month21 days, 3 hours left to enroll

810 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