Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 7 of 7

Thread: Delete Personal Macro Workbook

  1. #1
    Join Date
    29th August 2008
    Posts
    86

    Delete Personal Macro Workbook

    When using Vista and Excel 2007, Everytime I open a Workbook (.xls usually) I notice that Excel also opens up a Personal.xlsb file. This doesn't really get in the way but it is really annoying when I try to close excel. I have to do it twice to also close out the Personal.xlsb too. It does interfer with code that will Quit excel if only 1 workbook is open otherwise only close the 1 workbook.
    VB:
    Sub WorkBookClose() 
        If Application.Workbooks.Count <= 1 Then 
            ThisWorkbook.RunAutoMacros Which:=xlAutoClose 
            Application.Quit 
        Else 
            ThisWorkbook.RunAutoMacros Which:=xlAutoClose 
            ThisWorkbook.Close False 
        End If 
    End Sub 
    
    
    I can always change the workbook count to 2 but that can potentially cause problems. Is there a way to determine if that Personal.xlsb file is empty and not being used? What the heck is this even used for?

    I don't want to force a close on a workbook that someone is working on or a workbook that might be important. I've not heard of the .xlsb file type before and could use a little advise. Is there a way to stop it from opening automatically or is there a good way to deal with it. The only other thing I can think of is something like this:
    VB:
    Sub WorkBookCloseV2() 
        Dim wbBook As Workbook 
        If Application.Workbooks.Count <= 2 Then 
            For Each wbBook In Application.Workbooks 
                If wbBook.Name = "PERSONAL.XLSB" Then 
                    ThisWorkbook.RunAutoMacros Which:=xlAutoClose 
                    Application.Quit 
                End If 
            Next 
        End If 
        ThisWorkbook.RunAutoMacros Which:=xlAutoClose 
        ThisWorkbook.Close False 
    End Sub 
    
    
    This still doesn't stop the need to have to hit the Top Right X Twice to Close out Excel unless I use the same code also in a beforeClose Event. Any suggestions or advise? Thank You

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,708

    Re: Prevent Or Close Personal.xlsb

    If you don't need it, delete it.

    C:\Users\UserName\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB

  3. #3
    Join Date
    29th August 2008
    Posts
    86

    Re: Delete Personal Macro Workbook

    Well that just fixed my whole problem. Thanks Dave

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    1st October 2006
    Posts
    4

    Re: Delete Personal Macro Workbook

    For those still having trouble finding their PERSONAL workbooks...

    That path doesn't exist on my computer (running XP with Excel 2002 SP3); there is no "Users" folder on my C: drive.
    The path to my Personal workbook is:

    C:\Documents and Settings\UserName\Application Data\Microsoft\Excel\XLSTART\PERSONAL.XLS

    (I don't/didn't have a .XLSB version)

    Excel Video Tutorials / Excel Dashboards Reports


  5. #5
    Join Date
    18th June 2013
    Posts
    267

    Re: Delete Personal Macro Workbook

    Doesnt it hold any global macros/vba codes you have created? Deleting it will delete those procedures.

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    26th January 2003
    Location
    Derbyshire,UK
    Posts
    18,004

    Re: Delete Personal Macro Workbook

    It varies by version of Windows, obviously with Excel 2000 it would not be Personal.xlsb. 2000 does not support that extension, it would be personal.xls. Only versions since 2007 will have .xlsb

    Windows XP

    C:\Documents and Settings\Application Data\Microsoft\Excel\XLSTART\PERSONAL.XLS

    Windows 7

    C:\Users\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLS

    Excel 2007

    C:\Program Files\Microsoft Office\Office12\XLSTART\PERSONAL.XLSB

    Excel 2010

    C:\Program Files\Microsoft Office\Office14\XLSTART\PERSONAL.XLSB

    Excel 2013

    C:\Program Files\Microsoft Office\Office15\XLSTART\PERSONAL.XLSB

    No Office 13 was used by superstitious MS
    Hope that Helps

    Roy

    For free Excel tools & articles visit my web site

    If I have helped you and you feel like putting your hand in your pocket please make a donation to Children in Need

    RoyUK's Web Site

    royUK's Database Form

    Where to paste code from the Forum

    About me.

  7. #7
    Join Date
    8th March 2010
    Posts
    1,651

    Re: Delete Personal Macro Workbook

    You can check (version independent) using:

    VB:
    Sub M_snb() 
        MsgBox Application.StartupPath & "\" & Dir(Application.StartupPath & "\Pers*") 
    End Sub 
    
    

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Use A Macro From Personal Workbook For Multiple Files.
    By MB1 in forum Excel and/or Word Help
    Replies: 1
    Last Post: May 15th, 2008, 05:16
  2. Replies: 14
    Last Post: April 3rd, 2007, 04:57
  3. remove personal macro workbook
    By jasongrr in forum EXCEL HELP
    Replies: 2
    Last Post: April 28th, 2005, 22:55
  4. open personal macro workbook
    By h in forum EXCEL HELP
    Replies: 1
    Last Post: June 1st, 2004, 05:59
  5. Replies: 4
    Last Post: November 8th, 2003, 21:10

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
  •  
porno