Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Application quit

    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,

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Application quit

    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

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Application quit

    That worked beautifully!

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •