hexagon logo

Error executing basic script!

This is the error message I get when I try to run a script in my programs.  No line reference, just this error.  I've tried with more than one script, but this is all I get.  The scripts will compile in the edit window, but they won't run.  I'm new to using scripts, but I can't get past square one.  Any ideas what the problem could be?

Parents Reply
  • This works for me. It's your script pasted into my program, I just added the MsgBox for testing and the Exit For

    Sub Main
    
    Dim PCDApp As Object
    Dim PCDPartProgram As Object
    Dim PCDCommands As Object
    Dim PCDCommand As Object
    
    Set PCDApp = CreateObject("PCDLRN.Application")
    Set PCDPartProgram = PCDApp.ActivePartProgram
    Set PCDCommands = PCDPartProgram.Commands
    
    For Each PCDCommand In PCDCommands
    MsgBox "Text"
    Exit For
    Next PCDCommand
    
    End Sub

Children