RE: Programmatically enter Sales Order
Hi,
Similar problem: I am trying to respond to with sivMsgRspOk to Error 23 in Automated application from customization Manager. The error is trapped and response is sent to automated app, but it does not close the message. Instead it causes VB Runtime error.
Short version of code is shown below. I debugged this app. When automated app raises message 23. It is trapped correctly , I verified in Debug Mode. But the control does not return to the automated application, instead it results in run time error with same message 23 displayed on screen. It basically continues to loop through this error until interactive user terminates the application.
Public WithEvents SIVApp As SIVApplication
Private Sub Test_Automate()
Set SIVApp = StartAppAndAutomate("SD30600.exe", isolErr, iOSErr)
SIVApp.Controls("cPerToPost") = myPerPost
SIVApp.Controls("cBegprocessing") = True
End Sub
Private Sub SIVApp_Message(ByVal MessageNumber As Long, ByVal MessageText As String, ByVal MessageType As sivMessageType, MessageResponse As sivMessageResponse)
If MessageNumber = 23 Then
MessageResponse = sivMsgRspOk
End If
End Sub
Please help,
Thanks,
Sam