Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Event Handling

After creating a project using VB B1 Add on Wizard ,there is a class generated for handling the events for a button

Option Strict Off

Option Explicit On

Imports B1WizardBase

Imports SAPbobsCOM

Imports SAPbouiCOM

Namespace B1AddOn1

Public Class Button__1__3

Inherits B1Item

Public Sub New()


FormType = "-1"

ItemUID = "3"

End Sub

<B1Listener(BoEventTypes.et_CLICK, True)> _

Public Overridable Function OnBeforeClick(ByVal pVal As ItemEvent) As Boolean

Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)

Dim item As Item = form.Items.Item("3")

Dim button As Button = CType(item.Specific, Button)


Return True

End Function

End Class

End Namespace

but this code is not working when i clicked the button.

Please help

Former Member
Not what you were looking for? View more on this topic or Ask a question