# Pass ListBox to Function as argument not working - type mismatch when calling function

Hi,

I am trying to pass a ListBox to a function as an argument but when calling the function I get a mismatch on the name of the ListBox, I have put the code below.

```

``````Function listAvailableFiles(FolderPath As String, DropDown As ListBox)

Dim File As String
Dim j As Integer
File = Dir(FolderPath & "\*.cdr")
Do While File <> ""