Excel 2019 macros error: "Excel cannot load two files with the same name"

RogerThePerson

New Member
Joined
Jun 13, 2013
Messages
13
Since I upgraded to Excel 2019, my existing macros will not run - they have worked for years on older Excel versions and they DO run normally on my Excel 2019 installation at the office.
I use icons on the ribbon but when I click one, I get the message "Excel cannot load tow files with the same name".
PLEASE NOTE: This message ONLY appears in this situation - similar posts on this forum relate to similarly-named user files.)

I have used Agent Ransack to search for and delete all occurrences of:
'Book1.xls'
'Book1.xlsb'
'Personal.xls'
'Personal.xlsb'

I have tried hiding/unhiding files in various ways but nothing works - any ideas?


RogerThePerson
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
It means that the macro is trying to open a file with the same name as an already open file.
 
Upvote 0
It means that the macro is trying to open a file with the same name as an already open file.

Thanks for the quick response, but none of the macros tries to open any file, or references any files of any type.
They are all really simple macros that do simple actions completely within the workbook.
 
Upvote 0
If you only get the problem when running a macro, it must be trying to open another workbook.
Check the full path is is listed for the macro & make sure that it's the same as the open file, rather than an old copy of the file in another location.
 
Upvote 0
The buttons on the ribbon are linked to macros in a particular file. If that file is not in the same location as the already open file with that name, then Excel will try to load the new file, hence your error. Typically this happens when customisations are copied between machines and something like the personal macro workbook is in a different location. The simplest way to fix it may be just to delete and recreate the ribbon buttons on the home pc.
 
Upvote 0
FIXED - thank you RoryA! (Delete and start again - simples! I wish I'd thought of that ...).
My Excel macros now work for the first time on this shiny new PC, which I've had for SEVEN MONTHS.

Roger
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top