Vincenty

ArcView 9.1 - VBA not running in Calcuate Field

Discussion created by Vincenty on Jul 16, 2010
Latest reply on Nov 24, 2010 by ustroetz
Hi,

I have a VBA script from ESRI I found on page:

http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=750&pid=745&topicname=Making_field_calculations

But it doesn't seem to work anymore! It is used to...

This is to calculate a sequential ID in a fied. The screenshot attached show the error message.

Is there any reason?

Static lastValue as variant
Dim Output as double
Dim pStartValue as double
Dim pIntervalValue as double

pStartValue = 1
pIntervalValue = 1

If IsEmpty(lastValue) Then
Output = pStartValue
Else
Output = lastValue + pIntervalValue
End If
lastValue = Output

Attachments

Outcomes