Automation error on dimensioning array of own type

O

onkl

Is anyone aware of a solution for the following problem.
used: MS Excel X
The relevant part of my code is:

Public Admins() As adm

(and that's it)
On initialisation, Excel v Mac will return an Automation error, Excel
v Windows manages OK.

Public Admins As adm (so not an array, just a "simple" variable)
is OK for excel, however not for me.
adm is a own type (description below), containing array's of other
hand made types (e.g. rekeningen). This seems to be no problem, since
admin as a simple variable works fine.

Thanks in advance,
Onno
(variable names are Dutch in case someone wonders :) )

Code for type adm (contains other types, also added)

[in other module]:
Public Type rekschema
nummer As Integer
naam As String
project As Boolean
projectverplicht As Boolean
credrekening As Boolean
debrekening As Boolean
dagboek As Integer
End Type

Public Type dagboekentry
letter As String
naam As String
rekeningnummer As Integer
rekeningindex As Integer
End Type

Public Type namenlijst 'deb en crediteuren
nummer As Integer
naam As String
End Type

Public Type adm
letter As String
naam As String
datasheet As Worksheet
rekeningen() As rekschema
gebruikdagboek As Boolean
dagboek() As dagboekentry
gebruikdebcred As Boolean
debrek As Integer
credrek As Integer
debiteuren() As namenlijst
crediteuren() As namenlijst
gebruikprojecten As Boolean
projecten() As namenlijst
gebruikkostenplaats As Boolean
kostenplaatsen() As namenlijst
End Type
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top