cancel
Showing results for 
Search instead for 
Did you mean: 

delete row of system matrix on form load

Former Member
0 Kudos

Hello I need delete some rows from a system matrix, the problem that I have it's when I instance the matrix into my variable this stops there and the code not continues, I don't know why. this is my code. the code stops on this line oMatrix = oForm.Items.Item(13).Specific

 Private Sub SBO_Application_ItemEvent(FormUID As String, ByRef pVal As ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
        BubbleEvent = True
        If pVal.FormTypeEx = "65213" Then
            If pVal.EventType = BoEventTypes.et_FORM_LOAD And pVal.BeforeAction = False Then
                Dim oMatrix As SAPbouiCOM.Matrix
                Dim oProd As String
                oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                oMatrix = oForm.Items.Item(13).Specific
                For i = 0 To oMatrix.RowCount - 1
                    oProd = oMatrix.Columns.Item("ItemCode").specific.value
                Next
            End If
            If pVal.EventType = BoEventTypes.et_FORM_CLOSE And pVal.BeforeAction = False Then
                oForm = Nothing
            End If
        End If
    End Sub

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185682
Active Contributor
0 Kudos

Hi Werner,

Try this:

oMatrix = oForm.Items.Item("13").Specific

Kind Regards,

Diego Lother

Former Member
0 Kudos

ups you right was the "13" in the item number, many thanks..

former_member185682
Active Contributor
0 Kudos

Hi Werner,

Great.

Don't forget to accept the answer as a correct answer clicking on the accept button below my answer.

Kind Regards,

Diego Lother