+ Reply to Thread
Results 1 to 6 of 6

Automatically close hidden workbooks (Personal.xlsb)

  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    35

    Automatically close hidden workbooks (Personal.xlsb)

    Here we go.
    I need the workbook Personal.xlsb there for my macros. It's hidden (most of the time), which is why, when I close the workbook I work with, there is a remaining blank Excel workbook that I have to manually close - Personal.xlsb. I've been doing this for weeks, but it's becoming annoying

    Is there a way to automatically close remaining hidden workbooks? Could this be done through VBA (hopefully there's a simpler way though!)
    Thanks

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Automatically close hidden workbooks (Personal.xlsb)

    Look at this link.

    http://answers.microsoft.com/en-us/o...3-35c91ccc97a1
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    08-01-2013
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Automatically close hidden workbooks (Personal.xlsb)

    Okay, thanks for that. Now, I'm not sure I understand what the second thing does (the add-in thing) but it seems to me it's not what I'm looking for.

    The first solution looks interesting, but I don't know how to implement it.
    What does "Public WithEvents App as Application" mean? Where do I select that? Should I create those from the Visual Basic tab? I've put the details below to make it easier.


    Put code into ThisWorkboook module of the PERSONAL.XLSB and save
    Public WithEvents App As Application

    Please Login or Register  to view this content.
    Last edited by JonSnow; 01-29-2014 at 09:16 AM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Automatically close hidden workbooks (Personal.xlsb)

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  5. #5
    Registered User
    Join Date
    08-01-2013
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Automatically close hidden workbooks (Personal.xlsb)

    I really don't understand all the strictness around this minor issue. Regardless, thanks for pointing it out Alan, will know better in the future.

    Now, can someone help with my questions above? Cheers

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Automatically close hidden workbooks (Personal.xlsb)

    You may Shift+Click the X to close the application or you may also add the Exit button to the Quick Access Toolbar.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

+ 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. Replies: 1
    Last Post: 08-07-2013, 09:12 PM
  2. [SOLVED] Working with WorkBook Close event and Personal.xlsb files
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2013, 12:40 AM
  3. control of active workbooks when 2 open and code in personal.xlsb
    By alan_m20 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2012, 02:23 PM
  4. Replies: 0
    Last Post: 05-10-2012, 09:22 AM
  5. Excel 2007 : personal.xls and personal.xlsb in 2007
    By ali84pk in forum Excel General
    Replies: 0
    Last Post: 02-04-2011, 01:02 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