Outlook VBScript预期语句错误

时间:2012-04-05 16:36:33

标签: vbscript outlook odbc ado

我是这个网站的新手。我已经彻底搜索了答案,似乎无法找到答案。我希望你们中的一个好人能够帮助我......

谢谢

当我尝试使用下面的代码显示运行我的自定义表单时,收到以下消息:

Script Error
Expected statement
Line No:33

代码:

Function Item_Open()
    Dim LeaveItem
    Dim IO
    If not Connection_Open Then
        MsgBox("Error connecting to SI")
        LeaveItem = True
        Item_Open = False
    Else
        Item_Open = False
    End If
End Function

Function Item_Close()
    If LeaveItem = True Then
        Exit_Function
    Else
    End If
End Function

Subroutine Connection_Open()
    Dim oSI
    Set oSI = New ADODB.Connection
    Dim ostrSI
    oSI.ConnectionString = "Driver={Progress OpenEdge 10.1C  Driver};HOST=192.168.1.1;DB=kob;UID=sii;PWD=sisys1;PORT=2501;"
    oSI.Open
End Sub

1 个答案:

答案 0 :(得分:1)

更改

Subroutine Connection_Open()

Sub Connection_Open()