+ Reply to Thread
Results 1 to 4 of 4

Ignore personal.xlsb when counting open workbooks

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Ignore personal.xlsb when counting open workbooks

    I want to control the way a workbook userform is closed by only quitting the application IF it is the only workbook open. Otherwise it will close the workbook and leave the application open for the remaining workbook.


    Please Login or Register  to view this content.
    i remembered though that I use a personal.xlsb file which no other user does which distorts the count. I used this to initially list workbooks open BUT I cant seem to get it to ignore the "personal" file so the count is 1 for all users

    Please Login or Register  to view this content.
    Any Ideas appreciated
    Last edited by nigelog; 07-26-2017 at 11:46 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Ignore personal.xlsb when counting open workbooks

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Ignore personal.xlsb when counting open workbooks

    Hi shg

    Im a bit confused LOL - I ran your sub and the workbook count was 2 (I expected it to be open workbook less xlsb file and the "+1" you specified)

    however if i remove the "+1"

    my workbook count is "0" not "1" as I would expect - any ideas???

    Edit Sorted shg - personal workbook name actually personal111 so needed
    Please Login or Register  to view this content.
    Ill work out how to use the function in the cancel button

    Many thanks
    Last edited by nigelog; 07-26-2017 at 11:46 AM.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Ignore personal.xlsb when counting open workbooks

    You're welcome.

+ 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. [SOLVED] Personal.XLSB macro pasting into Personal.XLSB
    By davepoth in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2015, 07:40 PM
  2. Close PERSONAL.xlsb if open
    By c00ly81 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2015, 09:46 AM
  3. Replies: 0
    Last Post: 01-15-2015, 05:53 AM
  4. VBA beginner question - Does the functionality of personal.xlsb go with workbooks?
    By brucemc777 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2014, 12:32 PM
  5. Automatically close hidden workbooks (Personal.xlsb)
    By JonSnow in forum Excel General
    Replies: 5
    Last Post: 01-29-2014, 09:24 AM
  6. Replies: 1
    Last Post: 08-07-2013, 09:12 PM
  7. 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

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