Private Sub UIButtonControl1_Click()    ' Call the Test method    Test() End Sub
Public Sub Test()    ' Put all code here    Dim pGP as Object    ......    .....    EH:    MsgBox pGP.GetMessages(), ...... End Sub
Option Explicit Private Sub UIButtonControl1_Click()    ' Call the Test method    Test() End Sub Public Sub Test()    Dim pGP as Object    Set pGP = CreateObject("esriGeoprocessing.GPDispatch.1")    On Error GoTo EH    pGP.AddToolbox ("D:\DRASTIC_MODEL.tbx")    pGP.MyModel    MsgBox pGP.GetMessages(), vbOkOnly, "Success"    Exit Sub EH:    MsgBox pGP.GetMessages(), vbOkOnly, "Error" End Sub
Private Sub UIButtonControl1_Click() Â Â Â Test End Sub
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.