Hi. I want my function to return a array.
I got this error: Compile error: Type Mismatch.

This is my code:

Code:

Public Function RegistaNBCobranca(Entidade As Integer, ContaBancaria As String, TipoDoc As String, Serie As String, NumDoc As Long, Prestacao As Integer, Valor As Double, DataDoc As String) As String
Dim Recibo As GcpBEDocumentoLiq

Dim Retorna(1 To 2) As String

With Recibo
     '....
     '....
     Retorna(1) = .NumDoc
End With
Retorna(2) = Recibo.Serie
RegistaNBCobranca = Retorna()
End Function
What's wrong with my code?