You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - Attribute Tables forum

error running vba code : user interrupt   Morgan Zondervan Jul 04, 2006
Re: error running vba code : user interrupt   Michael Knight Jul 04, 2006
Re: error running vba code : user interrupt   Morgan Zondervan Jul 05, 2006
Re: error running vba code : user interrupt   Jess Henderson Aug 14, 2006
Re: error running vba code : user interrupt   Miles Hitchen Aug 14, 2006
Re: error running vba code : user interrupt   Jess Henderson Aug 15, 2006
Re: error running vba code : user interrupt   Neil Curri Nov 20, 2006
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject error running vba code : user interrupt 
Author Morgan Zondervan 
Date Jul 04, 2006 
Message Whenever I try and calculate the x and y coordinates of a point shapefile using the code found in the Desktop help, I get the error:

error running vba script : user interrupt.

I have read some of the other discussions on this error and here's what I have tried so far:

1. delete normal.mxt
2. delete ESRI folder from application documents
3. restart computer
4. initialize field to 0 before calculating
5. remove arcID module from vb editor

I know it's not a problem with the code because it is copied directly from the help.

I am out of ideas. Can anyone help?

Thanks 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: error running vba code : user interrupt 
Author Michael Knight 
Date Jul 04, 2006 
Message It could be that the field you created to accept those values isn't properly defined. Also there is an ArcToolbox tool that will do this for you.
Data Management > Add XY Coordinates 
  Michael Knight
GIS Solutions Architect
Contract Land Staff, LLC
Stafford, Texas

http://www.contractlandstaff.com

 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: error running vba code : user interrupt 
Author Morgan Zondervan 
Date Jul 05, 2006 
Message I defined the fields as doubles. It should work, but it just doesn't. The tool you recommended worked nicely though....so simple, don't know why I didn't think of that! Thanks a lot for your help. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: error running vba code : user interrupt 
Author Jess Henderson 
Date Aug 14, 2006 
Message I just recently started to experience this same problem when trying to calculate area. I have tried all of the same fixes as were mentioned in the original post. I know that the field is correct because the code works perfectly fine on the same file when working from any other machine in our building (8). The code previously worked on this machine, it may have been caused by the most recent patch that I installed a few weeks ago. Does anyone have any insight?

Thanks

Jess Henderson
City of Georgetown (Texas)
jessh@georgetowntx.org 
 
Dim Output as double
Dim pArea as Iarea
Set pArea = [shape]
Output = pArea.area
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: error running vba code : user interrupt 
Author Miles Hitchen 
Date Aug 14, 2006 
Message Hi Jess,

Try renaming the normal.mxt file, and then restart ArcMap. That usually fixes VBA/Calculator related issues.

Cheers,
Miles. 
  Miles Hitchen
Software Engineer
Geospatial Team
Ordnance Survey
UK
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: error running vba code : user interrupt 
Author Jess Henderson 
Date Aug 15, 2006 
Message I finally found a thread from 2004 that gives the correct answer. A two+ year delayed "thank you" to Dan.

Subject Re: ArcMap - Field Calculator "User interrupt error"
Author dan rosenbalm
Date Jun 08, 2004
Message We have found a few solutions for this:

Workaround - Comment out all dim statements in the calulation script (Use a ' character at the beginning of the line).

Fix - Delete the arcid module from normal.mxt. To do this, open the VB editor, and expand normal.mxt in the project explorer window. Select ArcID in the module folder and delete it.
We had a bad reference in the ArcID module of the normal.mxt. Your ArcMap may be hanging up on an object in there as well. To check if you have the ArcID module, open the VB editor, and expand the normal.mxt tree in the project view. The ArcID module (if you have it), is in the modules folder.
Once you delete the problem entry, or the entire ArcID module, your scripts will work fine again.

Make sure you don't need the ArcID module for other customizations to run before you delete it!

The ArcID module can be unintentionally created by pushing the update ArcID module button on the options tab of the Customize menu.
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: error running vba code : user interrupt 
Author Neil Curri 
Date Nov 20, 2006 
Message I had the same problem calculating xy coords for the centroid of a polygon feature class. I was able to do it for a shapefile, but after I loaded data into personal geodb, I couldn't. Calculating area for the polygons works fine, though. I tried the fixes suggested here. None worked. I ended up joining table from the source shapefile to the imported geodb feature class. Using ArcGIS Desktop 9.0 (ArcInfo)