Microsoft Excel "Error 76 - Path not found"

Anonymous
2024-06-17T09:30:57+00:00

Hello, I have trouble validating certain Excel files—specifically tax return files—that use Macros and VBA. I need help resolving this.

Here's a detailed description of my problem - hope you don't mind me including every info including Row1 code or whatever that is)

I have been getting this error every time I validate my tax returns using Microsoft Excel. Usually, you download the compressed file from the taxman's portal (compressed folder containing the main tax file with Macros and all that stuff...eg. of file name: "VAT3_Return_'customerpin'".

Then there is a compressed folder containing a folder called "csv," in which auto-populated .csv files are included (eg. your purchases and sales with respective info to assist you in filing your returns). Now, back to the main file, when I import the relevant info and the "tax computation" sheet is populated, all I need to do now is click "Validate" which then prompts "Sheets ready to be uploaded Do you want to generate upload file?" upon which I click "Yes".

This is where my trouble begins, clicking "Yes" prompts an error:

"Run-time error '76': Path not found"

upon which I can either click "End" or "Help.". The former auto-creates a "Sheet1" with the error details.![](https://learn-attachment.microsoft.com/api/attachments/23343e4b-8d82-4648-84b0-5644a8c7d336?platform=QnA"https://learn-attachment.microsoft.com/api/attachments/a12bfc60-34f5-451f-b226-6ce0d8766d86?platform=QnA" title="filestore.community.support.microsoft.com" rel="ugc nofollow">

Microsoft 365 and Office | Excel | Other | Windows

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. Andreas Killer 144K Reputation points Volunteer Moderator
    2024-06-17T10:11:43+00:00

    The error message says it all: The code expects a path that doesn't exist on your PC. None of us can say what that path is.

    It sounds like you are not the creator of the file, but just the end user?

    If so, upload the file here, I'll take a look:
    Microsoft Answers Community Public Request - Dropbox

    Andreas.

    0 comments No comments
  2. Anonymous
    2024-06-17T11:25:57+00:00

    Yes, I am just but the end user, usually download the file from the tax portal. I have uploaded the file.

    0 comments No comments
  3. Andreas Killer 144K Reputation points Volunteer Moderator
    2024-06-17T15:15:35+00:00

    I can't reproduce the error with the file, on the contrary I get other errors when I run the code.

    If I open the file I get an RTE 9, I looked at the code and found that a sheet "Sheet1" is accessed which is not in the file.

    I found the Validate button in the last sheet, when I run the code I get an error "Error found in the sheet", I click Ok and sheet "Errors" is shown with some data.

    I think the best way is to contact the developer of the file, because the code and the worksheets are password protected.

    I've seen other code that executes

    ChDir FolderName
    and FolderName is "" at this point which causes the RTE 76 you mention. FolderName is generated from another variable "path" and this variable is generated from

    path = DefPath & uploadFileNm
    where

    DefPath = Application.DefaultFilePath

    and

    uploadFileNm = a generated string from Date/Time and a cell in another sheet

    I think the issue is that FolderName is generated when you e.g. click other buttons, but if you click the Validate button the FolderName is empty and causes the issue.

    Send this the developer of the file, maybe it's helpful.

    Andreas.

    1 person found this answer helpful.
    0 comments No comments