Automation error while using Model (.tbx) in ArcObjects

1012
0
07-14-2011 03:00 AM
NitinBele
New Contributor
I am  facing problem in accesessing custom toolbox from a network drive.The code is in VBA and it gives me automation error when I try to access any Geoprocessing tool.

Dim pUID As New UID
pUID = "esriGeoprocessingUI.ArcToolboxExtension"
Dim pATBE As IArcToolboxExtension
Set pATBE = Application.FindExtensionByCLSID(pUID)
Dim pTool As IGPTool
Set pTool = pAtb.GetToolbyNameString("ModelName")
Dim pComm As IGPToolCommandHelper
pComm.SetTool pTool
pComm.Invoke Nothing

Any pointers ?

Lu
0 Kudos
0 Replies