Hi Every one,
I have a problem with the VBscript below.
As soon as I press the button, on my user form, to calculate a field the whole form closes. It calculates the fields but it keeps hiding or closing all the forms.
I oragenaly created it by, exporting a model from model builder to get the script.
Can any one help me with this one?
Is there another way to calculate a value in to the selected items of a table?
Private Sub CalcTeam_1_Click()
' -------------------------------------------------------
' Calc to Team_1.vbs
'Allocate points to Team_1
' --------------------------------------------------------'
Create the Geoprocessor object
Set GP = CreateObject("esriGeoprocessing.GPDispatch.1")
' Load required toolboxes...
GP.AddToolbox "C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx"
GP.AddToolbox "C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Analysis Tools.tbx"
' Local variables...
PointsNE_ = "PointsNE_"
PointsNE___2_ = "PointsNE_"
Team_1_shp = "C:\MMC Project NetGroup\IssueTo\IssueJobsTo\Spit\Team_1.shp"
PointsNE___3_ = "PointsNE_"
' Process: Calculate Field...
GP.CalculateField_management PointsNE_, "AllocatedT", """Team_1""", "VB"
End Sub