macros look for PERSONAL.xlsb in wrong location

Andrew Collins 61 Reputation points
2021-12-12T22:57:06.923+00:00

The computer crashed and the Windows 10 OS was reinstalled by a professional. He placed all recovered data in "Documents" on the D drive (C being a SSD with the OS on it). Many macro enabled workbooks used for business have now been returned to their original locations (in a folder on the C drive for legacy reasons) and are working with one major exception. When any macros located in the Personal.xlsb are called there is an error message saying that excel cannot find the Personal.xlsb file in a folder in the D drive. The path in the error message includes a folder with a very long series of alphanumerics, which I assume are related somehow to One Drive. However, I have deleted the Personal.xlsb that had been copied to the D drive after the reinstallation, and replaced it in the normal C:\users\name\AppData\Roaming\Microsoft\Excel\XLSTART location, complete with all its macros. In the VBA window navigation pane Personal.xlsb is shown and when run using F5 \ F8 in the VBA window the macros work. But for some reason macros in other workbooks seem to think that Personal.xlsb is in another location. I have been through File | Options | Advanced to the General section and told Excel to "At startup, open all files in ...XLSTART" but that had no effect (and I didn't think it would). The offending line of code is
Application.Run "PERSONAL.xlsb!DeleteEbayFromCellMenu"
Given that I can see the Personal.xlsb in the Navigation pane of the VBA window, can anyone please help me with a reason why Excel is looking for it in another drive?

{count} votes

6 answers

Sort by: Most helpful
  1. Jim Climb the Mountain 10 Reputation points
    2023-10-11T15:12:40.23+00:00

    so here is how i solved my problem with this:

    i have my macros as buttons in the ribbon

    the buttons in the ribbon were looking in the wrong location.

    when i removed and replaced the buttons to the macros--it stopped looking in the wrong location.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.