Microsoft Visual Basic Run-time error '53': File not found (on Excel Macro VBA on Mac)

Anonymous
2022-12-26T17:17:02+00:00

I just wanna open a pdf file with using VBA code on Excel on Mac but code gives this error also says The application named “Microsoft Excel” does not have permission to open the file named “Sample_File1.pdf”. I NEED HELP!

Microsoft 365 and Office | Excel | For education | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Jim G 134K Reputation points MVP Volunteer Moderator
    2022-12-26T18:17:35+00:00

    The best way to take care of this error is to install updates for Adobe Acrobat. Doing so will clear this error.

    If you no longer want to use Acrobat, then there are some hidden files you must delete.

    **Delete "linkCreation.dotm"**from the following folders:
      ~/Library/Group Containers/UBF8T346G9.Office/User Content/Startup/Word/
     ~/Library/Group Containers/UBF8T346G9.Office/User Content/Startup/PowerPoint/

    ~/Library/Group Containers/UBF8T346G9.Office/User Content/Startup/Excel/

    To get to these hidden files, in Finder press Shift+Command+L to take you to the library folder, then drill into the folders as shown above.

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-12-26T19:26:41+00:00

    Thanks for help but i don't use Adobe Acrobat, i use Preview to open pdf files. Also I couldn't find these libraries and that shortcut doesn't work for me 😅

    0 comments No comments
  3. Jim G 134K Reputation points MVP Volunteer Moderator
    2022-12-27T16:39:28+00:00

    Hi Mina,

    Sorry about that. 99% of time when someone has error 53 it's because they had Adobe Acrobat at one time and either didn't install updates or didn't completely remove it. My bad!

    In your case, I am able to reproduce the error message 53 using your code example. I suspect this is because of Apple's "sandbox" policy that does not allow one application to start up another one.

    You might be able to get around this but Apple has made it wildly consusing and complicated: https://stackoverflow.com/questions/30949272/the-macscript-function-is-not-working-well-in-office-for-mac-2016-any-ideas/30949324#30949324

    0 comments No comments