I am trying to create a function that returns a Boolean array. I'm getting a Type Mismatch error inside the function with the following code:

[VBA]

Dim Neighbors() As Boolean
Neighbors = Neighborhood(Range("e5"))

Function Neighborhood(ByVal cell As Range) As Boolean()

Neighborhood = Array(True, False, True)

End Function

[/VBA]

What is the reason I can't assign the True/False values to the Neighborhood array? It is defined as a Boolean in the Function statement.

Thanks,
clew