2012-04-05 91 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()