Share via

compile error message

nate atwater 1 Reputation point
2021-01-20T20:10:26.63+00:00

Every time I enter anything into an excell cell it kicks me to another page and tells me there is a compile error. I have to look for declare statements and mark them with PtrSafe attribute, I have no idea what this means but I can get no work done when it keep doing this.

Microsoft 365 and Office | Excel | For business | Windows

1 answer

Sort by: Most helpful
  1. Erin Ding-MSFT 4,496 Reputation points
    2021-01-28T08:29:10.787+00:00

    @nate atwater

    Please give two screenshots of the detailed error message and Office version.
    You could go to File>Account>About Excel to check the version.
    61289-1.png

    Does this issue occur on specific Excel file or all files?
    If specific Excel file, is there any code in it?
    Please check if code is incompatible with the version or architecture of this application (for example, code in a document targets 32-bit Microsoft Office applications but it is attempting to run on 64-bit Office).

    You could try to open Excel in safe mode to eliminate interference from add-ins and startup items.
    Press Windows+R, type excel /safe, click OK.
    If nothing is wrong when opening Excel in safe mode:

    • Move the files in C:\Users\<User Name>\AppData\Roaming\Microsoft\Excel\XLSTART to other location temporarily, then check if the issue still exists.
    • If it doesn't work, please go to File>Options>Add-Ins. Towards the bottom of the window, where it says Manage, select COM Add-ins, click Go. In the dialog box, uncheck the add-ins to disable them.
      Then close and restart Excel to see if the issue is resolved.

    If safe mode doesn’t help, you could repair Office online.

    Besides, you could also try to clear all the files in C:\Users\<User Name>\AppData\Roaming\Microsoft\Excel to check this issue.
    Note: please back up important files before clearing them.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.