the following looks up for PDF files. but how to launch the file?
Function CustomFindFile(strFileSpec As String)
Dim strList As String
Set fsoFileSearch = Application.FileSearch
With fsoFileSearch
.NewSearch
.LookIn = "C:\PDF"
.FileName = strFileSpec
.SearchSubFolders = False
Me.Waarden_CBX.RowSource = ""
If .Execute() > 0 Then
For Each varFile In .FoundFiles
strFileList = strFileList & varFile & " ; "
Next varFile
End If
End With
MsgBox strFileList
Me.Waarden_CBX.RowSource = strFileList
Me.Waarden_CBX.SetFocus
Me.Waarden_CBX.Requery
Me.Waarden_CBX.Dropdown
End Function
Private Sub Knop0_Click()
CustomFindFile ("*.pdf")
End Sub
Private Sub Waarden_CBX_AfterUpdate()
Dim INFO As String
INFO = Me.Waarden_CBX.Value
ReturnValue = Shell(INFOHOS, 1)
End Sub
via shell is surely the wrong solution. What will do?
Thanks for advice
Marc Delatere, Knokke, Belgium.