API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Extract VatAccount

0
Hi,

Let me start by saying that I am by no means an expert on this subject.

I have a bit of a problem extracting the VatCode and other informations) with this piece of code.

    Public Sub AccountRefreshAccounts()

        Dim AccountData() As IAccountData
        Dim wsOutput As MicrosoftOfficeInteropExcelWorksheet
        Dim rngOutput As ExcelRange
        Dim intRowCounter As Integer

        wsOutput = CType(GlobalsThisWorkbookWorksheets(2), GlobalMicrosoftOfficeInteropExcelWorksheet)
        rngOutput = wsOutputRange(A5)

        AccountData = EconomicModuleGetAccounts

        For intRowCounter = 0 To AccountDataGetUpperBound(0)
            With rngOutput
                Cells(intRowCounter + 1, 1) = AccountData(intRowCounter)Number
                Cells(intRowCounter + 1, 2) = AccountData(intRowCounter)Name
                Cells(intRowCounter + 1, 3) = AccountData(intRowCounter)TypeToString
                Cells(intRowCounter + 1, 4) = AccountData(intRowCounter)VatAccountNameToString
                Cells(intRowCounter + 1, 5) = AccountData(intRowCounter)DebitCredit
                Cells(intRowCounter + 1, 6) = AccountData(intRowCounter)IsAccessible
            End With
        Next intRowCounter
    End Sub

When the code is executed I get an access denied error when trying to extract the VatCode or the name of it.

Any inputs are highly appreciated.
created Apr 1, 2012 by marj
0% Accept Rate
Q 5 A 13 C 0

Network

Find all the documentation and resources you need to build great apps.
Go to Developer site

Newsletter

Get the latest news and important info from the e-conomic developer world.
Sign up now

Visma e-conomic A/S
...