Hi
I have written below code to create Form . I want to put check if form already exists it should not create else it should create.
Private Sub CreateFormWithMatrix()
Try
Dim oItem As SAPbouiCOM.Item
Dim oButton As SAPbouiCOM.Button
Dim oStaticText As SAPbouiCOM.StaticText
Dim oEditText As SAPbouiCOM.EditText
Dim creationPackage
creationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
oForm = SBO_Application.Forms.AddEx(creationPackage)
Catch oEx As Exception
Finally
End Try
End Sub
Thanks
Request clarification before answering.
Hi,
Try
'If form already exists, the form will be selected, if not an exception will be thrown
oForm = sbo_application.forms.item("FrmMatrix1")
Catch
'Exception has been thrown, the form does not exists, create a new one here.
'Put your code to create the form here
End Try
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 24 | |
| 17 | |
| 6 | |
| 5 | |
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.