|
这么简单的代码,还要扣2次金钱...............
Function CallPhone(stDialStr As String) As Boolean
'调用: Call CallPhone("01012345678")
On Error GoTo Err_CallPhone
Const ERR_OBJNOTEXIST = 2467
Const ERR_OBJNOTSET = 91
Const ERR_CANTMOVE = 2483
Application.Run "utility.wlib_AutoDial", stDialStr
CallPhone = True
Exit_CallPhone:
Exit Function
Err_CallPhone:
If (Err = ERR_OBJNOTEXIST) Or (Err = ERR_OBJNOTSET) Or (Err = ERR_CANTMOVE) Then
CallPhone = False
Resume Next
End If
MsgBox Err.Description
Resume Exit_CallPhone
End Function |
|