0

I have a Worksheet.Activate macro for pasting information that has been working for over a year now. I have multiple users using the macro with no problems. Recently one user is having this error whenever they paste into this worksheet that activates the macro:

Run-time error '1004': 'C:\Users\xxxx\Documents\Master_Macros.xlsb' could not be found. Check the spelling of the file name, and verify that the file location is correct.

They have never had this issue before and as far as I know he hasn't done anything abnormal. The macro is located in the typical XLSTART folder, not the Documents folder. The macro file also includes other macros that are executing perfectly fine for this user. Excel is suddenly looking for the macro file in the Documents folder for this one Worksheet.Activate macro. I have spent some time googling, and I don't know if it is my keyword choice or what, I cannot find a solution.

The macro is run using this line:

 Application.Run ("Master_Macros.xlsb!'C_Tool_Paste_Window.CTool_LineFix'")

Any help would be appreciated!

  • I should mention that I tried putting the macro file into the Documents folder, and this works for the Worksheet.Activate macro. Unfortunately, this then returns a similar error for every other macro in the worksheet. – theMagicOne Jun 01 '16 at 14:10
  • Probably cause by your relative path/ no path to the xlsb. Try using `Application.Run Environ("appdata") & "\Microsoft\Excel\XLSTART\Master_Macros.xlsb!'C_Tool_Paste_Window.CTool_LineFix'"` – LocEngineer Jun 01 '16 at 14:36
  • `application.StartupPath` will return the XLStart folder. – Darren Bartrup-Cook Jun 01 '16 at 14:39
  • @LocEngineer So I tested this on my machine, and changing this path actually return the same error as the user's computer with the issue. Which makes zero sense considering the path is correct and the file is there. When I change it back to `Application.Run ("Master_Macros.xlsb!'C_Tool_Paste_Window.CTool_LineFix'")` it works normally on my machine. – theMagicOne Jun 01 '16 at 15:37

1 Answers1

0

I had similar problem when I installed Service Pack.

If the users are accessing files from different computers,

make sure they all have same service pack installed

MutjayLee
  • 578
  • 3
  • 6