I'm not sure of your exact requirement.
I have a routine that calls a function
Code:
Public Function OpenFileDialog( _
DisplayText As String, FilterText As String, ParamArray Filter() _
) As Variant '// Ref required:= Microsoft Office 11.0 Object Library '// return an array of selected items, ToUSe:
'// ItemArray() = OpenFileDialog("Please Select...","Images","*.gif","*.jpg","*.png","*.bmp")
Dim fd As FileDialog
Dim vrtSelectedItem As V......
routine
Code:
Sub test_filepicker()
Dim itemArray() As String
10 On Error GoTo test_filepicker_Error
20 itemArray() = OpenFileDialog("Please Select...", "Images", "*.gif", "*.jpg", "*.png", "*.bmp", "*.txt")
30 On Error GoTo 0
40 Exit Sub
test_filepicker_Error:
50 MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure test_filepicker of Module Module5"
End Sub
When I try to run test__filepicker with filters such as "D*.jpg" I get an Error 5 invalid procedure call or argument.
So my suspicion is you can only use *.extension or *.*.