Hello,Now that my python script is working (from ArcToolbox) I'd like to set it up to run from my VBA code. The code essentially provides an interface for the user to input the parameters that the script requires. Here are the important snippets:VBA:Dim Parameters As IVariantArray
Set Parameters = New VarArray
Parameters.Add CatchFile
Parameters.Add LandCover
Parameters.Add "H:\TEMP"
Parameters.Add LCTabOutF
Parameters.Add txtboxOutTabN.Value
Dim gp As Object
Set gp = CreateObject("esriGeoprocessing.GpDispatch.1")
gp.AddToolbox ("F:/Hydrology_Tools/Toolboxes/CatchmentDelineation.tbx")
gp.Execute "LandCover", Parameters, Nothing ' Automation error, unspecified error
Python:# Import Modules
import arcgisscripting
# Create Geoprocessor object
gp = arcgisscripting.create(9.3)
gp.overwriteoutput = True
# Set up parameters
catchmentsFC = gp.GetParameterAsText(0) #in a toolbox GUI, Type = FeatureLayer
landCoverFC = gp.GetParameterAsText(1) #in a toolbox GUI, Type = FeatureLayer
tempWorkspace = gp.GetParameterAsText (2) #in a toolbox GUI, Type = Workspace
tableFolder = gp.GetParameterAsText (3) #in a toolbox GUI, Type = Folder
tableName = gp.GetParameterAsText (4) #in a toolbox GUI, Type = String
tableView = tableFolder + "\\" + tableName
gp.Workspace = tempWorkspace
wsDesc = gp.Describe(tempWorkspace)
wsType = wsDesc.WorkspaceType
...
The parameters are added correctly to the array, but I get an unspecified error when I try to execute the script.Thank-you!