+ Reply to Thread
Results 1 to 2 of 2

application quit proceedure

  1. #1
    Registered User
    Join Date
    06-05-2006
    Posts
    6

    application quit proceedure

    I am a little confused I have a series of user forms and I wanted to hide the excel application when the file is loaded, then the only thing that is displayed is the user form. Well hiding the application and all my user forms works great with the exception of a couple of command buttons.

    I am trying to provide the user an exit from the user forms.
    The problem is if I use application.quit it will exit the workbook and appear as if excel closed. However if you look in task manager under processes you will see that excel is still running in the background.

    What I am confused about is why application.quit will not exit the application.

    What can I do to correct this issue?
    I have enclosed the code for both command buttons.

    Thanks in advance for any help.




    TO EXIT COMPLETELY I AM USING THIS
    COMMAND BUTTON CODE USED..
    ---------------------------------------
    Private Sub CommandButton2_Click()
    page1.Hide
    Application.DisplayAlerts = False
    ActiveWorkbook.Close , SAVECHANGES = False
    Application.Quit
    End Sub
    -------------------------------------------

    To cancel I am using this code.

    ------------------------------------------------
    Application.DisplayAlerts = False 'Turn off before saving
    Range("A1").Select
    VARANSWER = MsgBox("ARE YOU SURE YOU WANT TO CLOSE ? ", vbYesNo + vbCritical, "TEST")
    If VARANSWER = vbNo Then Exit Sub
    question1.Hide
    ActiveWorkbook.Close , SAVECHANGES = False
    Application.Quit
    ------------------------------------------

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    try
    unload me

    or

    unload.userform1

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1