+ Reply to Thread
Results 1 to 4 of 4

ActiveWorkbook.Close closing sheets, but not the window

Hybrid View

  1. #1
    Registered User
    Join Date
    12-17-2012
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    57

    ActiveWorkbook.Close closing sheets, but not the window

    Hi Guys,

    I have a code that saves and closes (or should close) the workbook:

    
    Sub SaveClose()
    
        ActiveWorkbook.Save
        ActiveWorkbook.Close False
    
    End Sub
    What it does instead is it closes all the sheets, but keeps the Excel blank window still open... Is it something wrong with the settings of my Excel or some global settings on my machine? Because when I searched around a bit for code to close workbooks, the above code appeared pretty much all the time (in different configurations sometimes).

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: ActiveWorkbook.Close closing sheets, but not the window

    May be this.......
    Sub SaveClose()
    ActiveWorkbook.Save
    Excel.Application.Quit
    End Sub
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    12-17-2012
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    57

    Re: ActiveWorkbook.Close closing sheets, but not the window

    That's it. Thanks a million!

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: ActiveWorkbook.Close closing sheets, but not the window

    You're welcome. Thanks for the feedback and rep.

+ 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. ActiveWorkbook.Close issues
    By WadeLair in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2012, 05:23 PM
  2. Replies: 6
    Last Post: 02-15-2012, 07:52 AM
  3. ActiveWorkbook.Close function
    By Dan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-17-2006, 05:20 AM
  4. [SOLVED] ActiveWorkbook.Close (False)
    By stefan via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2005, 08:05 PM
  5. error on ActiveWorkbook.Close
    By lesviago in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2005, 08:06 PM

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