getObjectContext的问题,急![在线等待中...]
为什么我使用getObjectContext后程序始终告诉我为Nothing,以至于不能使用.setcomplete和.setabout。一使用就告诉我对象未定义。
源码如下:
Public Function test123() As Integer
On Error GoTo err_handle
Dim objContext As COMSVCSLib.ObjectContext
Set objContext = GetObjectContext
aaa = 3
test123 = aaa
Err.Raise (1)
objContext.SetComplete
Set objContext = Nothing
Exit Function
err_handle:
objContext.SetAbort
Set objContext = Nothing
test123 = aaa
End Function