2012-04-05 96 views
0

我是这个网站的新手。我已经彻底搜索了一个答案,似乎无法找到答案。我希望你们中的一个细的人能够帮助我....Outlook VBScript预期声明错误

谢谢

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

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 
+0

要清楚你正在运行'Vbscript'不'VBA'? – brettdj 2012-04-06 01:48:27

回答

1

变化

Subroutine Connection_Open() 

Sub Connection_Open()