Do you know what an Excel 400 error is? Do you have any idea how to deal with this Excel runtime error 400? If not, do not worry. This post from MiniTool shows you detailed information about it and provides you with several proven solutions to help you get rid of it.
What Is VBA 400 Error in Excel
Visual Basic for Application (VBA) error in Excel is a less common runtime error that occurs when Microsoft Excel crashes at runtime. But as shown in the screenshot below, you cannot get the specific causes and solutions of the error from the error code 400.
According to online information, the common causes of this error are as follows:
- The macro you are trying to run has an error or is corrupted.
- MS Excel-related data files are attacked by malware or virus.
- The registry key is invalid.
- There are some errors in the VBA code.
- There are some problems with the Office installation.
- The settings of VBA in excel are incorrect.
How to Fix VBA Error 400 in Excel
After knowing the main causes of the Excel 400 error, here you can see how to deal with it. Since there are many reasons for the “Excel VBA error 400”, this article lists the corresponding common solutions. It is a complicated error, and you may need to try the following solutions one by one until it is resolved.
Solution 1. Move Excel Macros to a New Module
There could be a problem with the old code module if Excel 400 error occurs when you running Excel. The best way is to transfer the macros to a new module and check whether the error could be fixed. You can follow the steps below to do that.
Step 1. Open an Excel sheet and click on Developer (If you cannot see Developer in the ribbon, you may need to customize your Excel ribbon). Then click Visual Basic.
Also, you can press Alt + F11 key combinations to open VBA Editor directly.
Step 2. Click Insert > Module.
Step 3. Copy the VBA codes in the original module and paste them into the VBA Editor input box. Then right-click the original module and select the option to remove it.
Step 4. Click File and save your new module.
Solution 2. Enable Trusted Access to the VBA Project
Sometimes you may get the Excel VBA error 400 because your VBA projects are not trusted. Here you can see how to enable this option.
Step 1. Open your Excel sheet and go to File > Options > Trust Center.
Step 2. Select Trust Center Settings on the right side.
Step 3. Under the Macro Settings section, check Trust access to the VBA project object model and click OK to apply the change.
Step 4. Restart your Excel to confirm whether the VBA 400 error has been gotten rid of.
Solution 3. Check VBA Codes
Incorrect VBA codes can also cause the problem of “Excel 400 error” to occur. In this case, you need to check the code for errors. If you are not familiar with these procedures, it is recommended to seek professional help.
Solution 4. Other Methods
If the methods mentioned above cannot solve the Excel 400 error, you may need to try other ways listed below.
- Update your Windows system to the latest version.
- Repair Microsoft Office.
- Use antivirus software to clean your computer.
- Run a Windows SFC scan to detect and remove corrupt system files.
How to Recover Excel Files
If you cannot open Excel now, you may need to recover important Excel files. Here professional data recovery software – MiniTool Power Data Recovery is recommended to you. It supports scanning and displaying various files including documents, pictures, videos, audio, etc., and helps you recover 1GB of data for free. You can download it and try it out.
MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe
For detailed steps, you can refer to this post: How to Recover Office (Word, Excel, PPT, PST) Files for Free.
Final Words
In a word, Excel 400 error is an annoying issue that prevents Excel from using. Hope you can solve this trouble by trying the solutions mentioned above.
If you have found any other good solutions to this error, welcome to share them with us in the comment area below to help more users to get rid of this issue. Thank you so much.