How to fix "The syntax of this equation is incorrect" and other VBA errors

Problem

A common problem after completing a Windows Update is a broken VBA installation. VBA is required to properly run SOLIDWORKS and will impact the use of equations and macros. Sometimes this can be seen as a SOLIDWORKS launch error: "Failed to initialize Visual Basic for Apps, equations and macros will not work. Are you low on disc space?"

Failed to initialize Visual Basic for Apps... error

Other times, there are errors when opening parts and trying to edit equations, with an error like: "The syntax of this equation is incorrect".

The VBA Prerequisites used by SOLIDWORKS will need to be reinstalled to resolve these issues. These files can be found in <SOLIDWORKS installation files>\prereqs\VBA, and the three files required are the following:

  1. vba71.msi
  2. vba71-kb2783832-x64.msp (SOLIDWORKS 2020 and Older)
  3. vba71_1033.msi for English versions, and select the correct version for other languages

Note: If you are not using the English version, you can check which file to run by hovering over the different files in <SOLIDWORKS installation files>\prereqs\VBA.

Solution 1: SOLIDWORKS 2021 and Newer

  1. Download the VBA 20xx.zip file depending on your version year that is attached to this article
  2. Right-click on the ZIP file and select "Properties"
  3. In Properties, under the General tab, check the "Unblock" box, click "Apply", and click "OK"

    Unblock the Zip Folder
  4. Extract the ZIP file to a new empty folder
  5. Right-click the file named "vba71.msi" and select "Uninstall"
  6. Right-click on the file named "vba71_1033.msi" and select "Uninstall"
  7. Once both are successfully uninstalled, reinstall them by double-clicking on "vba71.msi" first, then "vba71_1033.msi" from the zip file
  8. Launch SOLIDWORKS and confirm the error is resolved.

     

Solution 2: SOLIDWORKS 2020 and Older

  1. Download the VBA.zip file that is attached to this article
  2. Right-click on the ZIP file and select "Properties"
  3. In Properties, under the General tab, check the "Unblock" box, click "Apply", and click "OK"

    Unblock the Zip Folder
  4. Extract the ZIP file to a new empty folder
  5. Right-click the file named "vba71.msi" and select "Uninstall"
  6. Right-click on the file named "vba71_1033.msi" and select "Uninstall"
  7. Once both are successfully uninstalled, reinstall them by double-clicking on "vba71.msi" first, then "vba71_1033.msi", and then finally "vba71-kb2783832-x64.msp"
  8. Launch SOLIDWORKS and confirm the error is resolved.

For additional support, existing customers can submit a ticket or new customers can contact Hawk Ridge Systems.

Was this article helpful?
3 out of 4 found this helpful

Articles in this section

Comments

0 comments

Article is closed for comments.