Wie kann ich eine System.Collections.ArrayList an eine Funktion übergeben?
In der Funktion möchte ich den ArrrayList durchsuchen.
Sub CreateTaskID()
Dim task As TaskData
Dim lngZeile As Long
Dim coll As Object
Dim TaskID As Integer
Set coll = CreateObject("System.Collections.ArrayList")
lngZeile = range("A" & rows.count).End(xlUp).Row
range("A" & lngZeile).Select
While (ActiveCell.Row > 3)
If ActiveCell.Value <> "Tag" Then
ActiveCell.Offset(0, 5).Value = 1
Set task = New TaskData
task.TaskDate = ActiveCell.Value
task.TaskFinished = ActiveCell.Offset(0, 1).Value
task.TaskTask = ActiveCell.Offset(0, 2).Value
task.TaskRepeat = ActiveCell.Offset(0, 3).Value
task.TaskPrio = ActiveCell.Offset(0, 4).Value
coll.Add task
searchInList (coll) 'Function
End If
ActiveCell.Offset(-1, 0).Select
Wend
Debug.Print "Anzahl der Task: " & coll.count
'task.TaskTask =
End Sub
Function searchInList(ArrayList)
'durchsuchen
End Function
|