English

Error: The expression contains an error. Modify the expression and try again

Error Message

In some situations after uninstalling the McAfee antivirus application, an error is returned when trying to create a label expression using VBScript.

Specifically, when accessing the label expression dialog by going to Layer Properties > Labels, then clicking the Expression button. When using VBScript as the parser and adding a label expression and clicking either Verify or OK, the follwing error is returned:

"The expression contains an error. Modify the expression and try again."
[O-Image] The expression contains an error

Cause

While the actual underlying reason the issue occurs is not known, the problem manifests itself in ArcGIS for Desktop, affecting VBScript.

Solution or Workaround

Download and run the McAfee Consumer Products Removal tool, available here.
After running it, reboot the machine and then try the label expression in ArcMap again.