Hi, I am having problems with a program in VB6 that creates transactions with COM in Dynamics 6.5. The program creates transactions, saves and releases batches without problem; but I can't deal with pop messages that appears sometimes and requires the user to push some button. The messages are part of the Messages.csv file from Dynamics. I included the "Message" Event in the code; but when I compile the program, a VB6 error appears saying the procedure declaration doesn't match with the Event declaration with the same name. This is part of the code:
Public WithEvents SIVApp As SIVApplication
....
Set SIVApp = StartAppAndAutomate("2001000.exe", iSolErr, iOSErr)
....
Private Sub SIVApp_Message(ByVal MessageNumber As Integer, ByVal MessageText As String, ByVal MessageType As sivMessageType, ByRef MessageResponse As sivMessageResponse)
....
End Sub
The compilation error appears in the SIVApp_Message procedure; like if VB6 doesn't recognize the input arguments. I have the help guide of Object Model Reference (COM), and the procedure is based on the sample for VB6. I can see that SWIMAPI shows sivMessageType and sivMessageResponse values in the list of constants, but the procedure is not recognized. The message says that there is an incorrect syntax on this procedure when it tries to compile it.
Any help will be very appreciated; it is very urgent that I release the program this weekend.
Thanks.
*This post is locked for comments