Run time error 76 "path not found"

HisHailo

New Member
Joined
Oct 25, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Good day,

I am new to this and I was requested to execute the code for work however I get the following error (the code was not written by me), I need to fix this before Monday. I have tried everything I can think of with no luck please help. The code is supposed to automatically run when you open the spreadsheet however it generates the following error:

1603620734177.png
1603620790618.png
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Welcome to MrExcel forums.

Does the C: drive exist?

I get error 76 "Path not found" with FilePath = "D:\tmp\Policy.txt" because my system doesn't have a D: drive.

OTOH I get error 53 "File not found" with FilePath = "C:\tmp\Policy.txt" because that file doesn't exist; the tmp folder also doesn't exist on C:.
 
Upvote 0
Welcome to MrExcel forums.

Does the C: drive exist?

I get error 76 "Path not found" with FilePath = "D:\tmp\Policy.txt" because my system doesn't have a D: drive.

OTOH I get error 53 "File not found" with FilePath = "C:\tmp\Policy.txt" because that file doesn't exist; the tmp folder also doesn't exist on C:.
 
Upvote 0
Hi John, yes mine does have a C: drive, I think the issue might be that "tmp" folder not existing.
 
Upvote 0
My investigation suggests you would get a different error in that case, i.e. error 53 "File not found".
 
Upvote 0
My investigation suggests you would get a different error in that case, i.e. error 53 "File not found".
I am honestly confused now because we do have the "C:drive" (see screen print below) what might then be issue:
1603633936918.png
 
Upvote 0
Regardless of the different errors I posted, if the C:\tmp\ folder doesn't exist the macro would definitely cause an error. In fact, your "Path not found" error is more sensible than my "File not found" error because logically the Open statement is evaluating the C:\tmp\ path part first, before the whole C:\tmp\Policy.txt file.

Are you sure the folder is named 'tmp' and not 'temp'?
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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