VBA error 400: What is it and how to fix it

Vlad Turiceanu
by Vlad Turiceanu
Editor-in-Chief
Passionate about technology, Windows, and everything that has a power button, he spent most of his time developing new skills and learning more about the tech world. Coming from a solid background in PC building...
Affiliate Disclosure
  • Excel Macro represents a set of commands and actions that are triggered by a VBA code
  • Usually, an Excel error 400 can happen if your Macro fails or crashes whilst it’s running.
  • Remember to check our Fix Corrupt Files Hub category for more interesting articles
  • Don't hesitate to bookmark our Microsoft Excel Guides for more related articles.
how to resolve VBA error 400
To fix various PC problems, we recommend DriverFix: This software will keep your drivers up and running, thus keeping you safe from common computer errors and hardware failure. Check all your drivers now in 3 easy steps:
  1. Download DriverFix (verified download file).
  2. Click Start Scan to find all problematic drivers.
  3. Click Update Drivers to get new versions and avoid system malfunctionings.
  • DriverFix has been downloaded by 0 readers this month.

When you have a set of actions that you do constantly, creating a Macro in Excel is crucial.

Once you create it, it runs on its own and delivers great reports. That is if you don’t get any error.

Some users seem to be getting a VBA error 400 when trying to run their Macro in Excel. There are no further indications only a box with an OK button.

Either way, don’t worry we have some simple solutions for you. We suggest that you follow the steps mentioned in this article in the presented order. Hopefully, they will help you solve your problem.

How can I solve error 400 in Excel?

1. Move your Macros to a new Module

  1. To create a new module go to the Tools menu.
  2. Click Macro – Visual Basic Editor.
  3. In the VBA click Module on the Insert menu.
  4. Paste the VBA code that you want to use.
  5. In the File menu click Save Global.
  6. Make sure to delete the old module.

2. Turn on the trusted access to VBA

how to resolve excel VBA error message

  1. Go to the Developer tab (If this is not available click File > Options > Customise Ribbon > choose the Developer checkbox).
  2. In the  Code group – go to the Developer tab.
  3. Click Macro Security.
  4. Select Developer Macro Settings – choose Trusted access to the VBA project.

3. Check your code

how to fix VBA error in excel macros

Make sure to always check your code for any mistakes. Additionally, checking for any macros corruption is necessary as well.


That’s about it. We hope that doing this confirmed solutions will fix your VBA 400 Error. In case you have other confirmed suggestions please let us know in a comment below.

This article covers:Topics:

Frequently Asked Questions

  • Without a doubt, VBA brings a lot of advantages and it’s the quickest way to automate your tasks and reports within Microsoft Office. Have a look at our selection of the best automated macro software.

  • To permanently save a macro in Excel, open the Developer Tab, and record your macro. You can find more in-depth details in this guide.

  • Macro requires special permissions in order to run automatically. Additionally, you can manually run it each time you need it.

There are no comments yet. Please leave a comment

add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *