The ArrContasAutomaticas()
parameter in the CriaContasAutomaticas
method of the Accounting Chart expects a multidimensional array of String
, more properly, 2 dimensions, with 5 rows for each column / account.
Below information about the structure of array :
Ano = Array(1, X)
Conta = Array(2, X)
Descricao = Array(3, X)
TipoEntidade = Array(4, X)
Entidade = Array(5, X)
The X
represents the number of the column, that is, for each account to be created, there must be a column (eg, 5 accounts, then 5 columns).
In case of multiple accounts, the code should include a cycle where the column is the control variable and the row is fixed for each field.
Something like this (no cycle, untested code):
Dim arrCbl(5, 2) As String
arrCbl(1, 1) = "2018"
arrCbl(2, 1) = "2110001"
arrCbl(3, 1) = "Conta 2110001"
arrCbl(4, 1) = "C"
arrCbl(5, 1) = "SOFRIO"
arrCbl(1, 2) = "2018"
arrCbl(1, 2) = "2120002"
arrCbl(3, 2) = "Conta 2120002"
arrCbl(4, 2) = "C"
arrCbl(5, 2) = "SOFRIO"
Motor.Contabilidade.PlanoContas.CriaContasAutomaticas arrCbl