Error: Error running VBA script, expected end of statement
When running an advanced expression in the Field Calculator, the following error message is returned:
"Error running VBA script, expected end of statement."
Visual Basic for Applications (VBA) has not been installed or is not at the correct version.
Solution or Workaround
- Verify that the VBA has been installed by selecting Tools > Macros. If the Visual Basic Editor is grayed out, the editor has not been installed.
- At version 8.x, VBA can be installed by running the ArcMap_vba.msi under the \Support\Vba6 folder found on the install CD.
- At 9.3 and 9.3.1, VBA can be installed by running the VBAOF11.msi and VBAOF11I.msi under the VBA and 1033 folders found on the install CD.
• At 9.3, it is recommended that a repair is run on the ArcGIS Desktop install.
A) To run a repair, insert the ArcGIS installation disk.
B) Click Exit and navigate to Start > Settings > Control Panel > Add or Remove Programs. Select ArcGIS Desktop and click the Change button. When prompted, select the Repair option.