+ Reply to Thread
Results 1 to 6 of 6

Close current application

  1. #1
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    927

    Close current application

    Hello

    how can i close current excel application?
    i cant use Application.Quit, because it will close all opened excel files
    and ActiveWorkbook.Close will close only workbook, without close excel application
    i want close only that excel i put the code it

    thanks
    Last edited by Undo; 09-06-2019 at 06:31 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Close current application

    I don't understand your request.
    You seem to be asking how you can close Excel but still have open workbooks which don't contain code.

    Please clarify. Stating the obvious but to be able to see a workbook you need to have Excel open.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Close current application

    Agree with Richard. A bit confused.
    However, maybe close all *.xlsm files and leave *.xls open?
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Close current application

    Quote Originally Posted by KOKOSEK View Post
    Agree with Richard. A bit confused.
    However, maybe close all *.xlsm files and leave *.xls open?
    @e97h

    If that's the case then one way

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    927

    Re: Close current application

    Thanks all and sorry, i will explain better

    i want vba code to close active workbook, but before the close i want code to stop all macros.. without stop macros application will not close.. it will open again


    test sub
    ' stop macros
    ' close active workbook
    end sub

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Close current application

    Perhaps you'd better upload the workbook. I'm reading this as something different.

    You now appear to be saying that you want to stop a macro that's presumably running and preventing you stopping the macro, closing a workbook and by extension closing the application.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Close Application
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2012, 07:13 AM
  2. Application Open/Close Event - Store Open and Close Times?
    By mccrimmon in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 07-13-2011, 04:21 PM
  3. close an application
    By neta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-19-2008, 12:32 AM
  4. Close application if...
    By maba in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-01-2007, 05:16 AM
  5. [SOLVED] Close an application with sendkeys
    By ina in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2006, 03:20 AM
  6. [SOLVED] difference application.quit & application.close
    By Pierre via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2005, 04:00 PM
  7. [SOLVED] How to Close an application?
    By Avi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2005, 09:05 AM
  8. application.close?
    By mgasparel in forum Excel General
    Replies: 0
    Last Post: 02-15-2005, 11:43 AM

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