Showing results for 
Search instead for 
Did you mean: 

MessageBox and BubbleEvent

0 Kudos


I am trying to open a MessageBox for some particular Customers in the A/R Invoice form (139). When pressing the button Add, a message box should ask, if the freight is allready added, if not, the invoice should not be added, otherwise yes.

Surprisingly, my code works, if I use the MsgBox from, but not the MessageBox from SAP. What do I need to know about the SAP message box?

Does anybody have an idea?

Does not work:

If SAPbouiCOM.IApplication.MessageBox("All OK", 2, "Yes", "No") <> 1 Then
    BubbleEvent = False
End If


If MsgBox("All OK", MsgBoxStyle.ApplicationModal Or MsgBoxStyle.YesNo, 
          "SAP") <> MsgBoxResult.Yes Then
    BubbleEvent = False
End If
0 Kudos

Just calling the SAP message box already causes the issue of A/R incoive not being added anymore.

If relevant, I call the function via an ItemEvent

AddHandler SAPbouiCOM.IApplication.ItemEvent, AddressOf ItemEventHandler


Private Sub ItemEventHandler(FormUID As String,
                               ByRef pVal As ItemEvent,
                               ByRef BubbleEvent As Boolean)
End Sub

Does this message box interfere with the default message box checking if the doctotal is greater than 0?



Accepted Solutions (0)

Answers (0)