Results 1 to 8 of 8

"Personal.XLSB is locked for editing"

This is a discussion on "Personal.XLSB is locked for editing" within the Excel Questions forums, part of the Question Forums category; Hello all, I have a simple macro that's in my default Excel startup file (Personal.xlsb - located in the folder ...

  1. #1
    Board Regular
    Join Date
    Mar 2008
    Posts
    174

    Default "Personal.XLSB is locked for editing"

    Hello all,

    I have a simple macro that's in my default Excel startup file (Personal.xlsb - located in the folder C:\Documents and Settings\Username\Application Data\Microsoft\Excel\XLSTART).

    The problem is when I try to open two instances of Excel (not create a new workbook). I get the error message "Personal.XLSB is locked for editing."

    I've look at other threads that talk about adding the macro as an "Add-In" (Personal.xlsb and multiple Excel's), BUT my problem is that I want to assign the macro a keyboard shoutcut (currently set to ctrl + shift + v).

    Is this possible? If so, can someone walk me through it since I'm very new to add in and don't know of a way to assign an add-in macro a keyboard shortcut.

    ~ Im2bz2p345

  2. #2
    shg
    shg is offline
    MrExcel MVP shg's Avatar
    Join Date
    May 2008
    Location
    The Great State of Texas
    Posts
    14,950

    Default Re: "Personal.XLSB is locked for editing"

    Close the instance of Excel that has opened Personal read-only, and assign the shortcut in the other instance. Then save Personal.xlsb (you can do that explicitly via the VBE, or be prompted to do so when you close the second instance of Excel).

  3. #3
    Board Regular
    Join Date
    Mar 2008
    Posts
    174

    Default Re: "Personal.XLSB is locked for editing"

    Quote Originally Posted by shg View Post
    Close the instance of Excel that has opened Personal read-only, and assign the shortcut in the other instance. Then save Personal.xlsb (you can do that explicitly via the VBE, or be prompted to do so when you close the second instance of Excel).
    Maybe I'm not understanding clearly enough, but let me clarify my situation..

    Personal.xlsb (located at C:\Documents and Settings\Username\Application Data\Microsoft\Excel\XLSTART) is where my macro's are saved and where my shortcut is saved.

    If I open the workbook MasterFile.xls, it automatically opens Personal.xlsb (also the .XLAM add-in files located in C:\Program Files\Microsoft Office\Office12\Library). My macro shortcut works fine in this document.

    With MasterFile.xls already open, if I then open a totaly new instance of Excel (through Start -> Programs -> Microsoft Office -> Excel 2007), I get promoted "Personal.XLSB is locked for editing." If I choose "Read-Only," my macro shortcut doesn't work. If you hit Ctrl + Alt + Del to get into the Task Manager, you'll notice there are two instances of "EXCEL.EXE" running.

    If I just double click an exciting Excel file (SecondFile.xls), it opens fine without getting the prompt (because this doesn't create a new instance of Excel; basically just opens the file using Office button -> Open). My macro shortcut works fine in this case. If you hit Ctrl + Alt + Del to enter the Windows Task Manager, then go to Processes, you'll notice only one instance of "EXCEL.EXE" is running.

    I want to know if there is a way to have two instances of Excel open (two processes in Task Manager running), without it prompting me and still being able to use my macro shortcut. Perhaps an add-in is the way to go about this, but I don't know if marco add-ins can be assigned keyboard shortcuts.

    ~ Im2bz2p345
    Last edited by im2bz2p345; Dec 8th, 2011 at 02:09 PM.

  4. #4
    shg
    shg is offline
    MrExcel MVP shg's Avatar
    Join Date
    May 2008
    Location
    The Great State of Texas
    Posts
    14,950

    Default Re: "Personal.XLSB is locked for editing"

    In that case, I can't answer your question because I'm not familiar with your problem. I had thought you were trying to create a new shortcut in a read-only version of Personal, which wasn't going to work.

    I have a Personal.xls, and use both Excel 2003 and 2007. I frequently have two or more instances of one or both open, and all but the original have Personal opened read-only -- but my macro shortcuts are available in all instances.

    Sorry I can't make a suggestion.

  5. #5
    Board Regular
    Join Date
    Mar 2008
    Posts
    174

    Default Re: "Personal.XLSB is locked for editing"

    Okay, I just tested it again and my shortcuts appear to be working in both instances of Excel now (there was something wrong in my Personal.xlsb file).

    I'm still wondering if there is a way to create a macro add-in for Excel, but assign it a shortcut?

    For example, I have this simple macro in my Personal.xlsb assigned to the shortcut Ctrl + Shift + V:
    Sub PasteSpecial()
    Selection.PasteSpecial Paste:=xlValues
    ' Keyboard Shortcut: Ctrl+Shift+V
    End Sub
    Is there anyway that I add this macro into an add in, but still retain my keyboard shortcut (Ctrl + Shift + V)?

    ~ Im2bz2p345

  6. #6
    shg
    shg is offline
    MrExcel MVP shg's Avatar
    Join Date
    May 2008
    Location
    The Great State of Texas
    Posts
    14,950

    Default Re: "Personal.XLSB is locked for editing"

    Just create the shortcut and save the add-in. It will be active when the add-in is loaded, and deactivated when it isn't.

  7. #7
    Board Regular
    Join Date
    Mar 2008
    Posts
    174

    Default Re: "Personal.XLSB is locked for editing"

    Quote Originally Posted by shg View Post
    Just create the shortcut and save the add-in. It will be active when the add-in is loaded, and deactivated when it isn't.
    Thank you for all your assistance shg! That worked great. I'm all fixed up now!

    ~ Im2bz2p345

  8. #8
    shg
    shg is offline
    MrExcel MVP shg's Avatar
    Join Date
    May 2008
    Location
    The Great State of Texas
    Posts
    14,950

    Default Re: "Personal.XLSB is locked for editing"

    Go us!

    Good luck.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com