Run-time error "53": File not found - How to fix?

David77

Board Regular
Joined
Jun 24, 2020
Messages
109
Office Version
  1. 365
Platform
  1. Windows
Hello everybody,

I am currently running an excel file in which I have created an order form that people can fill out with their information and the products that they would like to order. I am using a VBA code (please let me know in the comments if you want me to attach the entire code) attached to a macro I named "Submit Order" which converts the excel file to a PDF file and sends it by email to me. Following this, Excel (Microsoft Visual Basic) should provide me with a message saying "Your order has been submitted by email. Thank you.".

However, I recently sent this file to a friend, who renamed the file name from "Order form" to "Order form for xxx goods - department number". After this, he uploaded the file to our shared file database in Microsoft teams and when I downloaded it (please note that he has made no changes whatsoever to the file except for changing its name) and tried to run the macro it provided me with the following error:

1596523015598.png


Now, for some strange reason, the excel file actually still sends out the email despite the visual basic error.

When I try to debug the file I get the following information:
1596523068376.png


With a closer look my note "Kill strPath" links me to our sharepoint location for some reason:
Error snip 3 coding with file link.PNG


My own file looks like this with no error at all and no link at the "Kill strPath":

1596524604552.png



Finally, when the error email that I sent out when I clicked on the macro in my friends file also renamed his file to "Order%20Form" for some reason and not what he had changed the name to.
1596524534741.png


Does anybody have any idea how I can fix this? Especially so the right message is shown after clicking on the macro in my excel file.

I realize that this is quote cloudy, so please if you have any questions, want further information or anything similar, do not hesitate to ask me! :)

Whoever has read all of this, thank you so extremely much for your time! I would be thrilled to get some assistance in this matter.

Best regards,
David
 

Attachments

  • 1596523083129.png
    1596523083129.png
    8.4 KB · Views: 86

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
David

Are you opening the file from SharePoint?
 
Upvote 0
David

Are you opening the file from SharePoint?

Hello Norie,

Thank you very much for your quick response, I greatly appreciate it!

I am opening the file through a shared map in Microsoft Teams, where I click on the three dots "..." --> Open --> Open in Excel:

1596525873047.png


This simply just opens the file manually in excel for me. I thus do not understand why it is giving me this error. I have, to my knowledge (and to my friend's), not used SharePoint for anything regarding this file.
 
Upvote 0
David

What happens if you download the file then open it?
 
Upvote 0
David

What happens if you download the file then open it?

I have tried that now. It works now!

Do you know why it did not work the other time?

Thank you so much by the way :)
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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