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

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - Data Editing forum

Error Running VBA Code: User Interrupt"   Charles Haynes Sep 24, 2003
Re: Error Running VBA Code: User Interrupt"   Ianko Tchoukanski Sep 24, 2003
Re: Error Running VBA Code: User Interrupt"   Charles Haynes Sep 24, 2003
Re: Error Running VBA Code: User Interrupt"   dan rosenbalm May 27, 2004
Re: Error Running VBA Code: User Interrupt"   Valentina Boycheva Jun 05, 2004
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Error Running VBA Code: User Interrupt" 
Author Charles Haynes 
Date Sep 24, 2003 
Message i get this message on any and all vbscripts i run in ArcMap. please help

Charles Haynes
charlesh@dacafe.com 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Error Running VBA Code: User Interrupt" 
Author Ianko Tchoukanski 
Date Sep 24, 2003 
Message Give us an example!!! 
  http://www.ian-ko.com 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Error Running VBA Code: User Interrupt" 
Author Charles Haynes 
Date Sep 24, 2003 
Message i was even running your code for return_length

let me expand on this.

I have one GIS user that is having this problem all the other users have no problem with the code. and the code is stored on a network location. So there must be something in the way ArcMap is setup that is causing this. 
 
Dim pMxDoc As IMxDocument
Dim pGeometry As IGeometry
Dim pMap As IMap
Dim pCurve As ICurve
Dim dLength As Double
Set pMxDoc = ThisDocument
Set pMap = pMxDoc.FocusMap
Set pGeometry = [Shape]
pGeometry.Project pMap.SpatialReference
Set pCurve = pGeometry
dLength = pCurve.Length

__esri_field_calculator_splitter__
dLength
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Error Running VBA Code: User Interrupt" 
Author dan rosenbalm 
Date May 27, 2004 
Message We are having the same problem with two workstations. We have been able to get the code to run without giving errors by comment out the dim statements. Let me know if you found the solution to this.

Dan Rosenbalm
Kunsan GIO 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Error Running VBA Code: User Interrupt" 
Author Valentina Boycheva 
Date Jun 05, 2004 
Message It is easy to forget that the field calculator uses VBScript and not VBA. VBScript supports the so-called loose binding with the host application. It means that the type of variables is not declared explicitly. Every time you declare a variable "as" something, you'll get an error, for instance

Dim intCounter as Integer

It is sufficient to write

Dim intCounter

 
  Valentina Boycheva
Senior GIS Programmer/Analyst
http://www.jonesedmunds.com