• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

Ap won't start again after exit

In the form load, i have the statement:
If Not App.PrevInstance Then
etc...
to prevent more than one copy from loading at the same time.  The problem is that if someone exits the application, it won't start again until the computer is rebooted.  How can this be fixed??
0
donb1
Asked:
donb1
  • 2
1 Solution
 
cjoshuavCommented:
Make sure that all of your forms get unloaded when the program is closed.  It sounds like one of them is being kept open.

Joshua

0
 
cjoshuavCommented:
Try placing this at the end of each form:

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    Dim AForm As Form
    For Each AForm In Forms
        Unload AForm
    Next
    End
End Sub
0
 
donb1Author Commented:
Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now