VBScript error

I am getting the following error on some workstations but not all with the following VBScript. In my attempts to troubleshoot this I have reinstalled the Sage 100 workstation and used various users who all have necessary permission.

First my system

Sage MAS 100 Advanced 2013 Update 4

Workstations Win 7 x64 

The error:

MS Script Link Error Information

User... CSH-ERP
Date... 6/3/2014
Time... 12:38:56

OLE Error Number... -2147352567
Description........ <NewObject Error: 65>
Language........... VBScript

Script Line........ 104
Script Column...... 8

Here is the script


Dim oscript, retVal, oSS
Dim so, po, PathHome, ordtype
Dim mas_user, mas_password

so = PO_PurchaseOrder_bus_SalesOrderNo
po = PO_PurchaseOrder_bus_PurchaseOrderNo
ordtype = PO_PurchaseOrder_bus_OrderType

mas_user = "user"
mas_password = chr(100)+chr(100)+chr(100)+chr(100)+chr(100)+chr(100) not the password

PathHome = "\\csh-erp\Sage\Version2013\mas90\Home"

if ordtype <> "D" then
        msgbox "This option is only available on DROP SHIP orders.", vbokonly, "Message"
else
       'msgbox "This will write back po number " & po & " to s/o #" & so, vbokonly, "Testing"
       
        Set oScript = CreateObject("ProvideX.Script")
        retVal = oScript.Init(PathHome)
        If retVal <> 0 Then
                 MsgBox "Unable to Initialize MAS Path " & PathHome, vbOKOnly, "Error"
        Else Set oSS = oScript.NewObject("SY_Session")

retVal = oSS.nSetUser(MAS_user, MAS_password)
If retVal = 0 Then
      MsgBox "Unable to set module User/Password - " & oSS.sLastErrorMsg, vbOKOnly, "Error"
End

If retVal = oSS.nSetCompany(mas_scr_cmp, 1) If retVal = 0 Then
     MsgBox "Unable to set company - " & oSS.sLastErrorMsg, vbOKOnly, "Error"
End If

retVal = oSS.nSetModule("S/O")
If retVal = 0 Then
     MsgBox "Unable to set module S/O - " & oSS.sLastErrorMsg, vbOKOnly, "Error"
End If

retVal = oSS.nSetDate("S/O", MAS_SCR_DTE)
if retVal = 0 Then
   MsgBox "Unable to set module S/O date - " & oSS.sLastErrorMsg, vbOKOnly, "Error"
End If

retVal = oSS.nSetProgram(oSS.nLookupTask("SO_SalesOrder_ui"))
If retVal = 0 Then
    MsgBox "Unable to set program - " & oSS.sLastErrorMsg, vbOKOnly, "Error"
End If

Line reported by error Set oSOOrder = oScript.NewObject("SO_SalesOrder_bus", oSS)

retVal = oSOOrder.nSetKeyValue("SalesOrderNo$", so)
retVal = oSOOrder.nSetKey()
retVal = oSOOrder.nSetValue("UDF_DSPO$", po)
retVal = oSOOrder.nWrite()

' Clean up

oSS.nCleanup
oSS.DropObject
Set oSS = Nothing
Set oScript = Nothing

msgbox "Order # copied to sales order.", vbokonly, "Message"

End if

end if