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

David77

Board Regular
Joined
Jun 24, 2020
Messages
85
Office Version
365
Platform
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

Some videos you may like

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,724
Office Version
365
Platform
Windows
David

Are you opening the file from SharePoint?
 

David77

Board Regular
Joined
Jun 24, 2020
Messages
85
Office Version
365
Platform
Windows
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.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,724
Office Version
365
Platform
Windows
David

What happens if you download the file then open it?
 

David77

Board Regular
Joined
Jun 24, 2020
Messages
85
Office Version
365
Platform
Windows
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 :)
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,105,962
Messages
5,508,416
Members
408,684
Latest member
Amos101

This Week's Hot Topics

Top