0
votes

I have a macro that is saved in file A. The macro is supposed to be ran from another file - lets call it file B (which is a regular excel file - .xlsx). when opening the VBA editor from file B, I don't see the macro of file A in the list on the left. If I try to open the VBA editor from file A, it opens a separate editor, although it is supposed to go to the same editor, which is already open. Because of the above, I cannot run the macro. Note, that it works for users on another computer, so it is something in my settings.

I don't know if how it can be related, but there is another thing that started happening also recently. I created a few macros and saved in the PERSONAL.XLSB. It worked few a few weeks without any problem, but now, every time I open almost any excel file, I get an error massage saying: file in use PERSONAL.XLSB is locked for editing by 'my name' open 'REad-Only' or click 'Notify' to open read-only and receive notification when the documents is no longer in use.

I probably did something to change the setting, but I can't figure out what. Note, that the macro did work fine for quite a few months, even after I added macros to the PERSONAL.XLSB file.

Thanks

1
It looks like you have 2 instances of Excel running. To access file B from your macro in file A they should probably be in the same instance. ① how do you open file A and file B, by macro or manually? If by macro please share the macro. ② What you can try is backup and then delete your PERSONAL.XLSB to test if this causes all the issues.Pᴇʜ
@Pᴇʜ thanks. I open both files manually. I tried to delete the personal file and it didn't work, still having hte same issue. Now when I am on file B, when I click on Macros from the developer tab, it is empty (before it showed all my macros from the personal.xlsb). Any other suggestions why it opens in separate instances?Hana
When's the last time you restarted Windows? It sounds as if there are "orphaned" instances of Excel running... Possibly you have an add-in or some other software that works with Excel that's generating instances?Cindy Meister
@CindyMeister restarted a few times today after every possible solution I tried for this problem:(Hana
What do you see in Processes in the Task Manager? Are there multiple instances of Excel listed? When you say "open both files manually": How exactly are you doing this: from Excel's File/Open menu or through Windows Explorer?Cindy Meister

1 Answers

1
votes

I didn't find what caused the problem, but uninstalling and installing office solved it.