• Application quit

    Author
    Topic
    #356870

    Hi all,

    When using application.quit, I cannot seem to get Excell2000 to actually quit. I am using the Analysis ToolPak. When I go into the VBE, the only thing there is “funcres.xla”. Is there something else I should be looking at to fully close Excel?

    This is my code (with Interface as a userform):

    Private Sub CommandButton5_Click()
    Interface.Hide
    Unload Interface
    Application.ScreenUpdating = False
    Application.Visible = True
    Application.DisplayAlerts = False
    ThisWorkbook.Close
    Application.DisplayAlerts = True
    Application.ScreenUpdating = True
    Application.Quit
    End Sub

    Thanks,

    Viewing 0 reply threads
    Author
    Replies
    • #529002

      Michael,

      I don’t think Application.Quit works from a control. I would suggest that as you are closing a workbook at the same time that you transfer the Application.Quit statement (and maybe some of the rest of the code) to either the Workbook_BeforeClose or Workbook_Deactivate events and see if that helps.

      Andrew C

    Viewing 0 reply threads
    Reply To: Application quit

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: