Hi Axel,
Du machst keinen Syntaxfehler.
In der Hilfe steht dazu:
[ Public | Private ] [ Static ] Function functionName [ ( parameters ) ] [ As dataType ]
dataType
Specifies the data type of the function’s return value. A function can return a scalar value, a Variant, or an object reference. If you include this clause, functionName cannot end in a data type suffix. If you omit this clause and functionName doesn’t end in a data type suffix (and isn’t covered by an existing Deftype statement), the function’s return value is Variant.
Array sind keine scalar values.
Dazu noch
Tests an expression to determine if it evaluates to a single value.
Syntax
IsScalar ( expr )
Elements
expr
Any expression.
Return value
The IsScalar function returns TRUE (-1) if expr evaluates to one of the following:
EMPTY
Byte
Integer
Long
Single
Double
Currency
Date/Time
String
OLE error
Boolean (TRUE, FALSE)
Otherwise (if expr is an array, list, object, NOTHING, or NULL), IsScalar returns FALSE (0).
Andreas