To call the various ERP PRIMAVERA V9 editors from the VBA context is to use the example below:
Private Sub DrillDownDocumento()
Dim objCampoDrillDown As StdBESqlCampoDrillDown
Dim objParam As StdBEValoresStr
Set objCampoDrillDown = New StdBESqlCampoDrillDown
With objCampoDrillDown
.ModuloNotificado = "GCP"
.Tipo = tddlEventoAplicacao
.Evento = "GCP_EditarDocumento"
End With
Set objParam = New StdBEValoresStr
With objParam
'O modulo indica qual o editor que vai ser instanciado.
'.InsereNovo "Modulo", "V" ' Vendas
'.InsereNovo "Modulo", "C" ' Compras
'.InsereNovo "Modulo", "N" ' Internos
'.InsereNovo "Modulo", "S" ' Stocks
'.InsereNovo "Modulo", "M" ' Contas Correntes
'.InsereNovo "Modulo", "B" ' Tesouraria
.InsereNovo "Modulo", "M"
.InsereNovo "Filial", "000"
.InsereNovo "Tipodoc", "RE"
.InsereNovo "Serie", "2018"
.InsereNovo "NumDocInt", 1
End With
PSO.DrillDownLista objCampoDrillDown, objParam
Set objCampoDrillDown = Nothing
Set objParam = Nothing
End Sub