Message to set up a list

4

I would like to ask a question.

I'm using a component:

andsettheF4Modalpropertytotrue.

Butcontinuetogivemethesamemessage:

How do I resolve this issue?

    
asked by anonymous 29.03.2018 / 19:00

1 answer

5

The error occurs because VBA forms are modal and you are trying to open a non-modal list.

So to open the list, just change the F4Modal = True property and call the form as non-modal with the "vbModeless" flag. To drill down to the customer form, simply create a new instance of the form as indicated below.

' Chamada ao formulário
Private Sub AbreCliente()

Dim objfrmCliente As frmartigo

Set objfrmCliente = New frmartigo

' Fazer com que o formulário não seja modal.
objfrmCliente.Show vbModeless

End Sub

' Código para colocar no formulário.
' Variaveis privadas do formulário.
Private m_objSDKContexto As clsSDKContexto
Private m_blnControlosInicializados As Boolean

' Inicilaização do SDK
Private Sub InicializaSDKContexto()

If m_objSDKContexto Is Nothing Then

    Set m_objSDKContexto = New clsSDKContexto

    m_objSDKContexto.Inicializa Aplicacao.BSO, "GCP"
    PSO.InicializaPlataforma m_objSDKContexto

End If

End Sub

Private Sub UserForm_Initialize()
'Inicializa Contexto
InicializaSDKContexto

 'Inicializa os controlos
If Not m_blnControlosInicializados Then

    ' Inicia o componente com o contexto do ERP
    ctlF4.Inicializa m_objSDKContexto

    ctlF4.FormataLabel

    m_blnControlosInicializados = True

End If
End Sub
Private Sub UserForm_Terminate()

' Garantir que os recursos libertados.
ctlF4.Termina

m_blnControlosInicializados = False
End Sub

    
30.03.2018 / 11:09