Solved

Cannot quit the program!! Urgent Urgent

Posted on 1998-07-16
2
136 Views
Last Modified: 2010-05-03
I've wrote a program using rdo. When I use "Unload me" to quit the program, that havent any response, so cannot quit the program.  How to solve it?  What's wrong?
0
Comment
Question by:Galvani
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
swilt earned 10 total points
Comment Utility
Could be any number of possibilities,

The 'unload me' is called from the main form you wish to unload, not a procedure in a module.

Another form could be hidden and needs unloading

Try unloading the form explicitly i.e. unload Form1

try running this in the immediate window (you may have to press crtl-break) when you think the form should have unloaded
Put the code in a module
Public Sub ShowFormNames
    dim frm as form
   
    for each frm in Forms
        debug.print frm.name
    next
End Sub

put a break point in the QueryUnload and Unload events to make sure it is going in there, bearing in mind if Cancel is set to 1 in QueryUnload it will stop the form from unloading

As a last resort rename ShowFormNames to UnloadAllForms and change
'debug.print frm.name' to 'unload frm'
0
 
LVL 2

Expert Comment

by:swilt
Comment Utility
Also if you press ctrl-break then F8 is there any code still running anywhere (i.e. a loop of some kind)

And as an extreme last resort use 'End' to terminate the program
0

Featured Post

IT, Stop Being Called Into Every Meeting

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 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

10 Experts available now in Live!

Get 1:1 Help Now