Hallo zusammen,
ich habe eine Funktion die einen Array zurückliefern soll.
Den Array habe ich mit Arrays befüllt.
Am Ende kommt dann aber ein Type missmatch...
Hat jemand eine Idee?
Hier der Code:
Function checkJobOwnerArrayByJob(stelle As String) As Variant
Dim ss As New NotesSession
Dim db As NotesDatabase
Dim col As NotesDocumentCollection
Dim suchen As String
Dim doc As NotesDocument
Dim anzahlInhaber As Integer
Dim owner As Variant
Dim counter As Integer
Dim ownerlist As Variant
Set db=ss.currentdatabase
suchen="Form=""fmPerson"" & stellenID=""" & stelle & """"
Set col=db.search(suchen, Nothing, 0)
anzahlInhaber=col.Count
If anzahlInhaber>=0 Then
ReDim owner(anzahlInhaber-1)
Set doc=col.getfirstdocument
counter=0
While Not doc Is Nothing
ReDim ownerlist(1)
ownerlist(0)=doc.Fullname(0)
ownerlist(1)=doc.dokNr(0)
owner(counter)=ownerlist
counter=counter+1
Set doc=col.getnextdocument(doc)
Wend
Else
ReDim owner(0)
owner(0)="Unbesetzt"
End If
checkJobOwnerArrayByJob=owner
End Function
Er speichert mir im Array "owner" problemlos an jeder Position einen Array.
Leider abeer gibt es ihn dann nicht zurück...
Danke im Voraus.
Grüße
datkar